WorkflowFailure
Purpose and behavior
Section titled “Purpose and behavior”Error thrown by WorkflowResult.unwrap() when status is not done. result holds the whole WorkflowResult, code is its terminationCode and cause is its first error. A rejected gate therefore exposes code rejected; a suspended run has no code.
Complete example and detailed rules.
Parameters and properties
Section titled “Parameters and properties”codeRequiredTerminationCode | undefinedThe result’s terminationCode, available when unwrap() throws for failed, cancelled or rejected runs; undefined for paused or waiting-input runs.resultRequiredWorkflowResultThe unsuccessful WorkflowResult, with its task records, errors and usage.nameRequiredstringError class name used to distinguish this failure from other JavaScript errors.messageRequiredstringHuman-readable explanation of the failure.stackOptionalstring | undefinedJavaScript stack trace for the error, when available.causeOptionalunknownUnderlying failure this error wraps; quotaFault() and unavailableFault() follow this chain.

