When retries happen
BundleUp retries a request only when all of the following conditions are met. The HTTP method must be idempotent. OnlyGET, HEAD, and OPTIONS requests are retried by default. Write methods such as POST, PUT, PATCH, and DELETE are never retried automatically.
The upstream response must be retryable. BundleUp retries on 408 Request Timeout, 429 Too Many Requests, 502 Bad Gateway, 503 Service Unavailable, and 504 Gateway Timeout. Other status codes — including 500 and 501 — are returned immediately without a retry. Requests that time out at the proxy (20 seconds for the first attempt, 10 seconds for each retry) are treated as 408 and are also retried.
The request must not have exceeded the retry limit. By default, BundleUp performs up to 4 total attempts, which includes the initial request and up to 3 retries.
Custom retry count
You can override the default retry behavior by providing a custom retry count in the request headers.Retry-After support
If the upstream response includes a Retry-After header, BundleUp honors it.Retry-After values are capped at 15 seconds to avoid long delays, and both the numeric (seconds) and HTTP-date forms are supported. When no Retry-After header is present, BundleUp falls back to exponential backoff with jitter.
Important notes
Retries are only applied to requests that are safe to repeat. BundleUp will never retry non-idempotent requests, even ifBU-Max-Retries is provided.
If all retry attempts fail, the final upstream response is returned to the client.
