Skip to content

fix: retry API requests on network errors and timeouts#218

Merged
RUKAYAT-CODER merged 1 commit into
rinafcode:mainfrom
collinsezedike:fix/retry-logic-189
Apr 26, 2026
Merged

fix: retry API requests on network errors and timeouts#218
RUKAYAT-CODER merged 1 commit into
rinafcode:mainfrom
collinsezedike:fix/retry-logic-189

Conversation

@collinsezedike
Copy link
Copy Markdown
Contributor

Summary

  • The catch block in requestWithRetry previously let all network-level failures fall through without retrying
  • Added a timedOut flag to distinguish our internal timeout abort from an external one
  • Now retries on TypeError (network failure) and AbortError caused by the internal timeout, using the existing exponential backoff helper and maxRetries config

Test plan

  • Network error (e.g. offline) → request retries up to maxRetries times with exponential backoff
  • Timeout → same retry behaviour
  • 5xx / 429 HTTP errors → still retried (existing logic unchanged)
  • 4xx client errors → not retried (unchanged)
  • Retries respect per-request retries override in RequestConfig

Closes #189

@drips-wave
Copy link
Copy Markdown

drips-wave Bot commented Apr 26, 2026

@collinsezedike Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits.

You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀

Learn more about application limits

@RUKAYAT-CODER RUKAYAT-CODER merged commit 36a29e6 into rinafcode:main Apr 26, 2026
1 of 4 checks passed
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.

Missing Retry Logic

2 participants