The two formats
RFC 9110 defines Retry-After as either a number of seconds or an HTTP-date:
Retry-After: 120
Retry-After: Wed, 21 Oct 2026 07:28:00 GMTThe number is a whole, non-negative count of seconds after the response was received. The date should use the IMF-fixdate format, always in GMT. Two older date formats (RFC 850 and C's asctime) are obsolete, but recipients are still required to accept them, and this parser does.
When servers send it
- 429 Too Many Requests: how long to wait before the rate limit lets you through again (RFC 6585).
- 503 Service Unavailable: how long the service expects to be unavailable.
- 3xx redirects: how long to wait before following the redirect. Rare in practice.
What a well-behaved client does
- Waits at least as long as
Retry-Aftersays before retrying, instead of its own shorter backoff. - Accepts both formats, not just the number.
- Treats a date in the past as "retry now", and ignores a value it can't parse.
- Gives up and reports the error when the wait is longer than the caller can afford.
- Knows its provider's extras: the OpenAI and Anthropic SDKs also read a
retry-after-msheader.
Jitterbox's resilience report checks the first rule for you: every retry has to wait at least the Retry-After the failed response carried. To design the fallback, try the backoff calculator.