MCPcopy
hub / github.com/Effect-TS/effect / onError

Function onError

packages/platform/src/Socket.ts:431–438  ·  view source on GitHub ↗
(cause: Event)

Source from the content-addressed store, hash-verified

429 }
430 }
431 function onError(cause: Event) {
432 ws.removeEventListener("message", onMessage)
433 ws.removeEventListener("close", onClose)
434 Deferred.unsafeDone(
435 fiberSet.deferred,
436 Effect.fail(new SocketGenericError({ reason: open ? "Read" : "Open", cause }))
437 )
438 }
439 function onClose(event: globalThis.CloseEvent) {
440 ws.removeEventListener("message", onMessage)
441 ws.removeEventListener("error", onError)

Callers 8

args.tsFile · 0.50
options.tsFile · 0.50
effectify.tsFile · 0.50
fFunction · 0.50
fromAsyncIterableFunction · 0.50
fromReadableStreamFunction · 0.50
takeWithMethod · 0.50

Calls 3

removeEventListenerMethod · 0.80
unsafeDoneMethod · 0.80
failMethod · 0.65

Tested by

no test coverage detected