MCPcopy Index your code
hub / github.com/anomalyco/opencode / onError

Function onError

packages/opencode/src/plugin/openai/ws.ts:113–117  ·  view source on GitHub ↗
(error: unknown)

Source from the content-addressed store, hash-verified

111 }
112
113 function onError(error: unknown) {
114 socket.on("error", () => {})
115 cleanup()
116 reject(error instanceof Error ? error : new Error(errorMessage(error), { cause: error }))
117 }
118
119 function onClose(code: number, reason: Buffer) {
120 cleanup()

Callers

nothing calls this directly

Calls 5

errorMessageFunction · 0.90
onMethod · 0.80
cleanupFunction · 0.70
invalidateFunction · 0.70
rejectFunction · 0.50

Tested by

no test coverage detected