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
Maximum retry attempts per step before marking it as failed.
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:
| Status | Meaning |
|---|---|
done | Step completed successfully. |
error | Step failed (after retries, if configured). |
skipped | Step was skipped (e.g., condition was false in ConditionStep). |
Name of the step.
Outcome of the step.
Error message when status is
error.Time taken for the step in milliseconds.
WorkflowResult
The workflow returns aWorkflowResult containing final state and step results:
Final state after all steps. Includes updates from successful steps; failed steps may leave partial updates.
One entry per step. Use to check which steps succeeded, failed, or were skipped.