Retry block
Runs a sub-graph with automatic retries on failure, with exponential backoff.
Inputs
| Field | Type | Description |
|---|---|---|
payload | any | Passed through to the inner graph |
Configuration
- Max attempts: 1-10. The retry block tries the inner graph up to this many times.
- Initial delay: milliseconds before the first retry (default 500ms).
- Backoff factor: 1.5, 2.0, 3.0. Each retry waits factor × the previous delay.
- Max delay: caps the wait at this value (default 30 seconds).
Default: 3 attempts, 500ms initial, factor 2.0, 30s max.
Outputs
- inner — sub-graph that runs and can fail.
- success — fires when an attempt eventually succeeds. Payload includes
attempts(int) andtotal_wait_ms(int) for observability. - exhausted — fires when max_attempts was reached without success. Payload includes the same fields plus the last
errorobject.
When to use retry vs try/catch
- Retry block: the operation is transient — third-party API that sometimes returns 503, network glitch, rate limit. Worth trying again before giving up.
- Try/catch: the operation might fail and you want a different code path immediately (not "wait and retry the same thing").
Combine them: wrap a Retry block inside a Try/catch. If retries are exhausted, the catch branch handles the final failure.