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

Function abortError

packages/opencode/src/plugin/openai/ws.ts:368–372  ·  view source on GitHub ↗
(signal: AbortSignal | undefined)

Source from the content-addressed store, hash-verified

366}
367
368function abortError(signal: AbortSignal | undefined) {
369 const reason = signal?.reason
370 if (isAbortError(reason)) return reason
371 return new DOMException(reason instanceof Error ? reason.message : "Aborted", "AbortError")
372}
373
374function closeMessage(message: string, code: number, reason: Buffer) {
375 const details = [`code ${code}`]

Callers 2

onAbortFunction · 0.70

Calls 1

isAbortErrorFunction · 0.70

Tested by

no test coverage detected