Skip to content
Français

WorkflowFailure

import { WorkflowFailure } from "@elie-laloum/outpost";

Error thrown by WorkflowResult.unwrap() when status is not done. result holds the whole WorkflowResult and cause is its first error.

Complete example and detailed rules.

  • resultRequired
    WorkflowResult
    The unsuccessful WorkflowResult, with its task records, errors and usage.
  • nameRequired
    string
    Error class name used to distinguish this failure from other JavaScript errors.
  • messageRequired
    string
    Human-readable explanation of the failure.
  • stackOptional
    string | undefined
    JavaScript stack trace for the error, when available.
  • causeOptional
    unknown
    Underlying failure this error wraps; quotaFault() and unavailableFault() follow this chain.
export declare class WorkflowFailure extends Error {
  readonly result: WorkflowResult;
  constructor(result: WorkflowResult);
}