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

Automatic retry when receiving 5xx responses #25

Closed
rarkins opened this issue Jul 28, 2017 · 2 comments
Closed

Automatic retry when receiving 5xx responses #25

rarkins opened this issue Jul 28, 2017 · 2 comments

Comments

@rarkins
Copy link
Contributor

rarkins commented Jul 28, 2017

I am a heavy user of gh-got as part of renovate. A small percentage of request receive a 502 Bad Gateway response and it's pretty obvious that these should be retried somewhere in the stack rather than bailing and stopping all subsequent processing.

I was going to write a wrapper around gh-got to achieve this but then thought I'd open an issue here for discussion first as it seems like something all users of gh-got would benefit from and not specific to my application.

Relevant thread there: sindresorhus/got#199 (kind of dismissing the idea).

Additionally: I do not need stream support

@sindresorhus
Copy link
Owner

Sure, that could be useful. Could probably use https://github.com/sindresorhus/p-retry for this.

@rarkins
Copy link
Contributor Author

rarkins commented Jul 29, 2017

Thanks for the feedback and pointer to p-retry. What I plan to do is incorporate a p-retry wrapper within my application first and observe its results for a while before proposing the enhancement into gh-got here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants