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

Custom retry.retries function unexpectedly breaks statusCode and other conditional retries #753

Closed
unikoid opened this issue Mar 14, 2019 · 4 comments · Fixed by #830
Closed
Labels
enhancement This change will extend Got features 🎁 Rewarded on Issuehunt This issue has been rewarded on Issuehunt good for beginner This issue is easy to fix
Milestone

Comments

@unikoid
Copy link

unikoid commented Mar 14, 2019

Issuehunt badges

Since retry.statusCodes and retry.errorCodes option support is implemented as part of the default retries function, those options are incompatible with custom retry function. Moreover even default statusCodes become not working so you get retries for HTTP 401, for example.
This is not quite obvious and documentation says nothing about that.

I think this is a bug to be fixed or at least it should be stated in readme.


IssueHunt Summary

szmarczak szmarczak has been rewarded.

Backers (Total: $60.00)

Submitted pull Requests


Tips


IssueHunt has been backed by the following sponsors. Become a sponsor

@szmarczak szmarczak added enhancement This change will extend Got features good for beginner This issue is easy to fix labels Mar 14, 2019
@szmarczak szmarczak added this to the v10 milestone Mar 16, 2019
@gonejack
Copy link

And retries would not work with stream API which documentation should state it.

@gregory
Copy link

gregory commented Mar 23, 2019

And retries would not work with stream API which documentation should state it.

Oh man! I just spent hours trying to figure out why this wasn't working!
Should definitely be documented.

@IssueHuntBot
Copy link

@IssueHunt has funded $60.00 to this issue.


@issuehunt-oss
Copy link

issuehunt-oss bot commented Sep 8, 2019

@sindresorhus has rewarded $54.00 to @szmarczak. See it on IssueHunt

  • 💰 Total deposit: $60.00
  • 🎉 Repository reward(0%): $0.00
  • 🔧 Service fee(10%): $6.00

@issuehunt-oss issuehunt-oss bot added 🎁 Rewarded on Issuehunt This issue has been rewarded on Issuehunt and removed 💵 Funded on Issuehunt The issue has been funded on Issuehunt labels Sep 8, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement This change will extend Got features 🎁 Rewarded on Issuehunt This issue has been rewarded on Issuehunt good for beginner This issue is easy to fix
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants