MCPcopy Create free account
hub / github.com/Effect-TS/effect / onError

Function onError

packages/platform/node-shared/src/NodeSink.ts:99–99  ·  view source on GitHub ↗
(error: unknown)

Source from the content-addressed store, hash-verified

97 Effect.forever({ disableYield: true }),
98 Effect.raceFirst(Effect.callback<never, E>((resume) => {
99 const onError = (error: unknown) => resume(Effect.fail(options.onError(error)))
100 options.writable.once("error", onError)
101 return Effect.sync(() => {
102 options.writable.off("error", onError)

Callers

nothing calls this directly

Calls 3

onErrorMethod · 0.80
resumeFunction · 0.50
failMethod · 0.45

Tested by

no test coverage detected