-
-
Notifications
You must be signed in to change notification settings - Fork 688
fix: count for error response and network errors #2966
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
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #2966 +/- ##
=======================================
Coverage 93.48% 93.48%
=======================================
Files 89 89
Lines 24171 24177 +6
=======================================
+ Hits 22597 22603 +6
Misses 1574 1574 ☔ View full report in Codecov by Sentry. |
mcollina
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for opening a PR! Can you please add a unit test?
mcollina
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
|
there is a conflict now, can you fix it? |
lib/handler/retry-handler.js
Outdated
| : Math.min(currentTimeout * timeoutFactor ** counter, maxTimeout) | ||
|
|
||
| state.currentTimeout = retryTimeout | ||
| : Math.min(minTimeout * timeoutFactor ** counter, maxTimeout) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if counter starts at 1 should this not be (counter - 1)? This way the first retry uses the minTimeout value?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
right now it would start at double the original minTimeout
3a9f173 to
82ad41c
Compare
mcollina
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
This relates to...
Rationale
Changes
Features
Bug Fixes
Breaking Changes and Deprecations
Status