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

attempt is 1-based after each failed attempt.

Backoff table

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