Skip to main content
BundleUp’s proxy can automatically retry safe requests when an upstream API fails or rate-limits you. This improves reliability without requiring you to implement retry logic in your client.

When retries happen

BundleUp retries a request only when all of the following conditions are met. The HTTP method must be idempotent. Only GET, 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 429 Too Many Requests responses and on server errors (5xx). The request must not have exceeded the retry limit. By default, BundleUp performs up to 3 total attempts, which includes the initial request and up to 2 retries.

Custom retry count

You can override the default retry behavior by providing a custom retry count in the request headers.
BU-Max-Retries: <number>
The value represents the maximum number of retries, not total attempts. For example:
BU-Max-Retries: 4
This results in up to 5 total attempts (1 initial request + 4 retries). The maximum allowed value is 5. Any value greater than 5 is capped at 5. If the header is omitted, BundleUp uses the default retry limit. This header applies per request and does not affect other requests on the same connection.

Retry-After support

If the upstream response includes a Retry-After header, BundleUp honors it.
Retry-After: 3
In this case, BundleUp waits 3 seconds before retrying instead of using its default backoff timing.

Important notes

Retries are only applied to requests that are safe to repeat. BundleUp will never retry non-idempotent requests, even if BU-Max-Retries is provided. If all retry attempts fail, the final upstream response is returned to the client.