Skip to content

feat: add retry mechanism for failed API requests#1451

Open
Nandini868686 wants to merge 1 commit into
aryandas2911:mainfrom
Nandini868686:feature/api-retry-mechanism
Open

feat: add retry mechanism for failed API requests#1451
Nandini868686 wants to merge 1 commit into
aryandas2911:mainfrom
Nandini868686:feature/api-retry-mechanism

Conversation

@Nandini868686

@Nandini868686 Nandini868686 commented Jun 6, 2026

Copy link
Copy Markdown

📌 Description

This PR adds automatic retry handling for transient API failures, improving reliability when the backend is temporarily unavailable (e.g., Render cold starts).

🔗 Related Issue

Closes #1440

🛠 Changes Made

  • Added axios-retry dependency.
  • Configured automatic retries for network errors and 5xx server errors.
  • Added exponential backoff delay between retry attempts.
  • Preserved existing timeout and network error handling.
  • Verified production build succeeds.

📸 Screenshots (if applicable)

N/A (No UI changes)

✅ Checklist

  • [✓ ] Code runs locally
  • [✓ ] Followed project structure
  • No console errors
  • Properly tested changes
  • [✓ ] Linked the issue

🚀 Notes for Reviewers

Implemented retry handling using axios-retry with exponential backoff. Retries are triggered for network errors and 5xx responses while preserving existing timeout and error handling logic.

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.

[Enhancement] Add Retry Mechanism for Failed API Requests

1 participant