MCPcopy Create free account
hub / github.com/Zoo-Code-Org/Zoo-Code / toGatewayStreamError

Function toGatewayStreamError

src/api/providers/zoo-gateway.ts:44–52  ·  view source on GitHub ↗
(raw: unknown)

Source from the content-addressed store, hash-verified

42// handles thrown HTTP errors applies to mid-stream failures too.
43// Exported for unit tests.
44export function toGatewayStreamError(raw: unknown): Error {
45 const err = raw as { message?: unknown; status?: unknown; code?: unknown } | null
46 const message =
47 typeof err?.message === "string" && err.message.length > 0 ? err.message : "Zoo Gateway stream error"
48 return Object.assign(new Error(message), {
49 status: typeof err?.status === "number" ? err.status : undefined,
50 code: typeof err?.code === "string" ? err.code : undefined,
51 })
52}
53
54function buildZooCodeSignInUrl(): string {
55 const callbackUri = encodeURIComponent(

Callers 2

createMessageMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected