Skip to content

chore(config): add 524 to retryable status codes#2895

Merged
tusharmath merged 2 commits intomainfrom
retry-code
Apr 9, 2026
Merged

chore(config): add 524 to retryable status codes#2895
tusharmath merged 2 commits intomainfrom
retry-code

Conversation

@tusharmath
Copy link
Copy Markdown
Collaborator

@tusharmath tusharmath commented Apr 9, 2026

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

  • Added 524 to status_codes in crates/forge_config/.forge.toml (runtime default config)
  • Added 524 to the expected status_codes list in the corresponding unit test in crates/forge_config/src/retry.rs

Testing

cargo insta test --accept -p forge_config

@github-actions github-actions bot added the type: chore Routine tasks like conversions, reorganization, and maintenance work. label Apr 9, 2026
@tusharmath tusharmath enabled auto-merge (squash) April 9, 2026 07:48
@tusharmath tusharmath merged commit 4bde378 into main Apr 9, 2026
8 checks passed
@tusharmath tusharmath deleted the retry-code branch April 9, 2026 07:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

type: chore Routine tasks like conversions, reorganization, and maintenance work.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant