effect-io-ai

Package: effect
Module: Cause

Cause.fail

Creates a Fail cause from an expected error.

Details

This function constructs a Cause carrying an error of type E. It’s used when you want to represent a known or anticipated failure in your effectful computations.

See

Signature

declare const fail: <E>(error: E) => Cause<E>

Source

Since v2.0.0