Setyenv · Docs
  • English
  • Español
  • 中文
  • 日本語
  • العربية
  • Deutsch
  • Français
  • हिन्दी
  • Bahasa Indonesia
  • Italiano
  • Nederlands
  • Português
  • Русский
  • Türkçe

Retry block

Runs a sub-graph with automatic retries on failure, with exponential backoff.

Inputs

FieldTypeDescription
payloadanyPassed 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) and total_wait_ms (int) for observability.
  • exhausted — fires when max_attempts was reached without success. Payload includes the same fields plus the last error object.

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.