effect-io-ai

Package: effect
Module: Cause

Cause.isFailure

Checks if a Cause contains a failure.

Details

This function returns true if the Cause includes any Fail error. It’s commonly used to confirm whether a workflow encountered an anticipated error versus just defects or interruptions.

Signature

declare const isFailure: <E>(self: Cause<E>) => boolean

Source

Since v2.0.0