Skip to content

Conversation

@terrerox
Copy link
Contributor

Description

  • Add RetryReason enum to distinguish between rate-limit and server-error retries
  • Extend retryable errors to include 5xx server errors, CORS errors, and network failures
  • Implement exponential backoff with jitter for server errors (1s base, max 10s)
  • Add HTTP status codes for 5xx errors (500, 502, 503, 504) to constants
  • Add CORS error message to ErrorMessages enum
  • Update onRetry callback signature to include RetryReason parameter
  • Refactor retry logic to remove redundant variables and magic strings
  • Update all retry callbacks across codebase to handle new RetryReason parameter
  • Add comprehensive test coverage for server error retries
  • Simplify error detection logic with named constants and helper functions

Related Issues

Related Pull Requests

Checklist

  • Changes have been tested locally.
  • Unit tests have been written or updated as necessary.
  • The code adheres to the repository's coding standards.
  • Relevant documentation has been added or updated.
  • No new warnings or errors have been introduced.
  • SonarCloud issues have been reviewed and addressed.
  • QA Passed

Testing Process

Additional Notes

…ason differentiation

  - Add RetryReason enum to distinguish between rate-limit and server-error retries
  - Extend retryable errors to include 5xx server errors, CORS errors, and network failures
  - Implement exponential backoff with jitter for server errors (1s base, max 10s)
  - Add HTTP status codes for 5xx errors (500, 502, 503, 504) to constants
  - Add CORS error message to ErrorMessages enum
  - Update onRetry callback signature to include RetryReason parameter
  - Refactor retry logic to remove redundant variables and magic strings
  - Update all retry callbacks across codebase to handle new RetryReason parameter
  - Add comprehensive test coverage for server error retries
  - Simplify error detection logic with named constants and helper functions
@terrerox terrerox requested review from a team, CandelR and larryrider as code owners February 11, 2026 05:16
@terrerox terrerox self-assigned this Feb 11, 2026
@terrerox terrerox marked this pull request as draft February 11, 2026 05:16
@terrerox terrerox changed the title refactor: enhance retry logic with server error handling and retry reason differentiation [BR-1794]: Enhance retry logic with server error handling and retry reason differentiation Feb 11, 2026
@cloudflare-workers-and-pages
Copy link

Deploying drive-web with  Cloudflare Pages  Cloudflare Pages

Latest commit: c65f899
Status: ✅  Deploy successful!
Preview URL: https://674a26fb.drive-web.pages.dev
Branch Preview URL: https://feature-retry-with-backoff-s.drive-web.pages.dev

View logs

@sonarqubecloud
Copy link

Quality Gate Failed Quality Gate failed

Failed conditions
1 Security Hotspot

See analysis details on SonarQube Cloud

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant