429 rate limits now retried automatically with Retry-After support
@cloudflare/workers-utils@0.29.0
Minor Changes
-
#14877
552bcfcThanks @jasoncabot! - Respect and surface theRetry-Afterheader on Cloudflare API responsesPreviously, if a Wrangler command (e.g.
wrangler versions upload,wrangler deploy) hit the Cloudflare API's rate limit, the resulting error gave no indication of how long to wait before trying again, and 429 responses weren't retried at all (only5xxerrors were, with a fixed linear backoff).Now:
429 Too Many Requestsresponses are automatically retried, alongside the existing5xxretry behaviour.- If a retried response includes a
Retry-Afterheader, Wrangler waits for that duration instead of the default backoff, and logs a message indicating how long it's waiting. To avoid blocking for an excessive amount of time, waits longer than 60 seconds fail fast instead — the surfacedRetry-Aftervalue lets the caller schedule its own retry. - If a retryable error is ultimately surfaced to the user (e.g. because retries were exhausted), the error message includes a note with the
Retry-Afterduration, and thecommand-failedentry written to the Wrangler output file (WRANGLER_OUTPUT_FILE_PATH/WRANGLER_OUTPUT_FILE_DIRECTORY) gains aretry_after_msfield. This lets scripts and CI/CD pipelines calling Wrangler repeatedly (for example,wrangler versions uploadon every commit) read the wait duration directly instead of regex-parsing stderr.
APIError.isRetryable()is unchanged (still5xxonly);retryOnAPIFailure()separately retries 429s.retryAfterMs, when present, is honoured for any retried error, not just 429s.retryAfterMsis also now populated onAPIErrors raised from direct R2 object requests, the Browser Rendering API, and errors surfaced from commands using the officialcloudflareSDK client.
Fetched July 28, 2026


