Repository navigation
only retry downloadtool on 500s and 408 and 429 - #373
Merged
Merged
Conversation
ericsciple
commented
Mar 9, 2020
| return await action() | ||
| } catch (err) { | ||
| if (isRetryable && !isRetryable(err)) { | ||
| throw err |
Contributor
Author
There was a problem hiding this comment.
i was happy to learn nodejs retains the original stack trace when an exception is rethrown
ericsciple
commented
Mar 9, 2020
thboop
reviewed
Mar 9, 2020
| if (err instanceof HTTPError && err.httpStatusCode) { | ||
| // Don't retry anything less than 400 | ||
| // Don't retry 404 Not Found | ||
| if (err.httpStatusCode < 400 || err.httpStatusCode === 404) { |
Collaborator
There was a problem hiding this comment.
I think most 4xx responses are not retryable, the only one we should really retry for is 408- Request timeout and 429- Rate Limiting?
| expect(info).toHaveLength(0) | ||
| }) | ||
|
|
||
| it('checks retryable after second attempt', async () => { |
ericsciple
force-pushed
the
users/ericsciple/m167retry
branch
from
March 9, 2020 16:01
835cbef to
6797a48
Compare
ericsciple
force-pushed
the
users/ericsciple/m167retry
branch
from
March 9, 2020 17:06
6797a48 to
728942f
Compare
ericsciple
force-pushed
the
users/ericsciple/m167retry
branch
from
March 9, 2020 18:25
728942f to
abde3c6
Compare
ericsciple
force-pushed
the
users/ericsciple/m167retry
branch
from
March 9, 2020 18:28
abde3c6 to
3dedf1c
Compare
immense055
reviewed
Jul 6, 2020
| expect(info).toHaveLength(0) | ||
| }) | ||
|
|
||
| it('checks retryable after second attempt', async () => { |
Derrick-MUGISHA
pushed a commit
to Derrick-MUGISHA/toolkit
that referenced
this pull request
Oct 12, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
downloadtool should only retry on 500s and 408 and 429