-
-
Notifications
You must be signed in to change notification settings - Fork 935
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
Retry feature #98
Comments
@sindresorhus I'm kind of against retry functionality in got, yet it come in handy from time to time. Here's why:
So it is kind of heavy feature and I believe, that retry should be added consciously by developer. const retry = require('retry');
const got = require('got');
let result = await retry(() => { return got('google.com'); }); |
So, to sum up, the implementation would be pretty lightweight, but the benefits are obvious. The only point is to deal with network failures, not response failures (interpreting status code, etc). |
I didn't mean we should implement all the retry options. I just want a option-less sane default. The benefit of including it in core is that all consumers benefit without doing any extra work, or more importantly without having to know it's needed in the first place. Most wouldn't even be aware they should be using |
@vdemedes then I misunderstood issue a little - in this case streams still can be in game. Cool 🌴 |
Networks suck. They fail all the time and are fragile. Having functionality for
got
to retry in case of failure would make it a lot more solid.@vdemedes made this great module we could use a inspiration: https://github.com/vdemedes/got-retry
Question: Should it be on by default?
@floatdrop Thoughts?
Related: request/request#1300
The text was updated successfully, but these errors were encountered: