Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add retry middleware for handling request retries #93

Merged
merged 3 commits into from
Jun 22, 2024
Merged

Conversation

ksysoev
Copy link
Owner

@ksysoev ksysoev commented Jun 22, 2024

This pull request adds a new retry middleware for handling request retries. The middleware retries the request a maximum of maxRetries times with a delay of interval between each retry. If the request succeeds at any retry, the middleware returns nil. If all retries fail, it returns the last error encountered.

@codecov-commenter
Copy link

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 92.65%. Comparing base (16225d8) to head (c2217ad).

Additional details and impacted files
@@            Coverage Diff             @@
##             main      #93      +/-   ##
==========================================
+ Coverage   92.51%   92.65%   +0.14%     
==========================================
  Files          22       23       +1     
  Lines         908      926      +18     
==========================================
+ Hits          840      858      +18     
  Misses         50       50              
  Partials       18       18              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@ksysoev ksysoev merged commit 7973326 into main Jun 22, 2024
2 checks passed
@ksysoev ksysoev deleted the 89-retry-middleware branch June 22, 2024 08:48
@ksysoev ksysoev mentioned this pull request Jun 22, 2024
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.

2 participants