503 during a deploy, a 429 when you’ve hit their limit. For requests that are safe to repeat, BundleUp retries automatically so a brief blip doesn’t reach your code.
Retries apply to the Proxy and the Unified API. MCP requests are never retried; your MCP client decides what to do.
When a request is retried
A request is retried only when all of these are true:- The method is idempotent:
GET,HEADorOPTIONS.POST,PUT,PATCHandDELETEare never retried, because repeating them could create or change something twice. - The failure is transient:
408 Request Timeout,429 Too Many Requests,502 Bad Gateway,503 Service Unavailableor504 Gateway Timeout. A provider that doesn’t answer within the timeout counts as408; a provider BundleUp can’t reach at all counts as502. - There are retries left. By default, 3 retries: up to 4 attempts in total.
400, 401, 403, 404 and 500) is returned straight away.
How long BundleUp waits
- If the provider sent a
Retry-Afterheader (seconds or an HTTP date), BundleUp waits that long, capped at 15 seconds. - Otherwise it backs off exponentially: about 250 ms, 500 ms, 1 s, 2 s, 4 s for attempts 1 to 5, each with ±20% random jitter so many clients don’t retry in lockstep.
Changing the retry count
SendBU-Max-Retries to set the maximum number of retries (not attempts) for one request:
The header only affects that request. It doesn’t make non-idempotent methods retryable.
Turn retries off (
0) when you have your own retry logic, or when a fast failure is more useful than a late success, such as in a user-facing request with a tight deadline.
Turn retries up for background jobs against providers known to be flaky.
Retries and usage
Each retry is a real call to the provider and is logged and counted as a request. AGET that succeeds on the third attempt counts as three requests. Retries also count toward the connection’s rate limit at the provider, though not toward BundleUp’s.
Retrying writes yourself
Because writes are never retried automatically, handle their failures in your code. If the provider supports idempotency keys (for example, anIdempotency-Key header), send one. The Proxy forwards it unchanged, so you can retry the write safely.
