Skip to main content

How retries work

A delivery attempt fails when SafeFetch gets a non-2xx response, network error, or timeout. If attempts remain, the action returns to pending with next_retry_at.

Backoff formula

backoff_seconds = min(2^attempt * 10, 3600)
attempt is 1-based after each failed attempt.

Backoff table

Failed attemptDelay before next try
120s
240s
380s
4160s
5320s
capped at 3600s

retries

  • Set per action (1 to 100, default 3).
  • Once attempts are exhausted, action becomes failed.

Failure callbacks

If callback is set, SafeFetch sends a failure callback with status: failed and last_error when the action reaches terminal failure.

Monitoring retries

Use action reads/listing fields:
  • retries_remaining: attempts left
  • next_retry_in_seconds: countdown to next attempt
  • last_error: most recent failure reason