Skip to content
This repository has been archived by the owner on Feb 12, 2022. It is now read-only.

Fix retries option is not fully respected, fix not to throw error cau… #30

Merged
merged 5 commits into from
Mar 3, 2020

Conversation

nkzawa
Copy link
Contributor

@nkzawa nkzawa commented Feb 26, 2020

…sed by error status

  • Currently, it retries only the retries option - 1 times. This PR fixes to respect the option.
  • Changes default the retries option from 5 to 4 because of the above problem and waiting for 12960 is too long.
  • Fix not to throw an error when it's because of res.status >= 500. It used to happen when the last error is like ECONNREFUSED but the main error (the most frequent error) is res.status >= 500 )
  • Fix server is not closed upon error on tests

@nkzawa nkzawa requested review from lucleray, styfle and TooTallNate and removed request for lucleray and styfle February 26, 2020 07:13
@nkzawa nkzawa force-pushed the fix-retry-count-and-error branch from 5e3d2e8 to f7b66ae Compare February 26, 2020 08:01
@lucleray
Copy link
Member

Looks good! Not entirely sure about:

Changes default the retries option from 5 to 4 because of the above problem and waiting for 12960 is too long.

Having a 12s delay was intentional (see #26), but I concede that it's not a one size fits all solution.

@nkzawa
Copy link
Contributor Author

nkzawa commented Feb 26, 2020

@lucleray I don't know the reason of the PR but feel even 2160 is too long. For example, aws-sdk retries 3 times with delays 100, 200, 400 by default.

@nkzawa
Copy link
Contributor Author

nkzawa commented Mar 2, 2020

@lucleray I'm still skeptical about waiting for that long by default, but reverted for now. Can you review again?

@nkzawa nkzawa force-pushed the fix-retry-count-and-error branch from b4a9a12 to f1bc660 Compare March 2, 2020 05:03
index.js Show resolved Hide resolved
index.js Show resolved Hide resolved
@nkzawa nkzawa requested a review from lucleray March 2, 2020 10:55
@nkzawa nkzawa merged commit 1e065de into master Mar 3, 2020
@nkzawa nkzawa deleted the fix-retry-count-and-error branch March 3, 2020 11:58
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants