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

Function error

packages/effect/src/unstable/reactivity/AsyncResult.ts:460–461  ·  view source on GitHub ↗
(self: AsyncResult<A, E>)

Source from the content-addressed store, hash-verified

458 * @since 4.0.0
459 */
460export const error = <A, E>(self: AsyncResult<A, E>): Option.Option<E> =>
461 self._tag === "Failure" ? Cause.findErrorOption(self.cause) : Option.none()
462
463/**
464 * Converts a result to an `Exit`, succeeding with a success value, failing with a failure cause, or failing with `NoSuchElementError` for `Initial`.

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected