Retry & Error Handling
Workflows support configurable retries for failed steps and expose per-step results. UseretryPolicy to make pipelines resilient to transient failures.
retryPolicy Config
number
required
Maximum retry attempts per step before marking it as failed.
number
required
Base delay in milliseconds between retries. Uses exponential backoff (backoffMs * 2^attempt).
Example
When retries apply
When retries apply
Retries apply when a step throws an error. The step is re-run up to
maxRetries times with exponential backoff between attempts.StepResult Status
Each step produces aStepResult with a status:
string
Name of the step.
'done' | 'error' | 'skipped'
Outcome of the step.
string
Error message when status is
error.number
Time taken for the step in milliseconds.
WorkflowResult
The workflow returns aWorkflowResult containing final state and step results:
TState
Final state after all steps. Includes updates from successful steps; failed steps may leave partial updates.
StepResult[]
One entry per step. Use to check which steps succeeded, failed, or were skipped.