chore(config): add 524 to retryable status codes#2895
Merged
tusharmath merged 2 commits intomainfrom Apr 9, 2026
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Add HTTP 524 (Timeout Occurred) to the list of retryable status codes so that requests failing with Cloudflare's timeout error are automatically retried.
Context
HTTP 524 is a Cloudflare-specific status code indicating that the origin server timed out before responding. Like other transient infrastructure errors (522, 502, 503, 504), a 524 response is a temporary condition that is safe and beneficial to retry rather than surface as a hard failure to the user.
The existing retry config already handled similar transient errors (429, 500, 502, 503, 504, 408, 522, 520, 529), but 524 was missing, causing requests that hit a Cloudflare timeout to fail immediately instead of being retried.
Changes
524tostatus_codesincrates/forge_config/.forge.toml(runtime default config)524to the expectedstatus_codeslist in the corresponding unit test incrates/forge_config/src/retry.rsTesting
cargo insta test --accept -p forge_config