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

Function onFailure

packages/effect/src/internal/effect.ts:3361–3368  ·  view source on GitHub ↗
(cause)

Source from the content-addressed store, hash-verified

3359 const logEffect = logWithLevel(options.log === true ? undefined : options.log)
3360 return matchCauseEffect(self, {
3361 onFailure(cause) {
3362 const failure = findFail(cause)
3363 return Result.isFailure(failure)
3364 ? failCause(failure.failure)
3365 : options.message === undefined
3366 ? logEffect(cause)
3367 : logEffect(options.message, cause)
3368 },
3369 onSuccess: (_) => void_
3370 })
3371 }

Callers

nothing calls this directly

Calls 2

findFailFunction · 0.85
failCauseFunction · 0.50

Tested by

no test coverage detected