-
Notifications
You must be signed in to change notification settings - Fork 53
adjust decider to not retry client errors #125
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
Conversation
b12d8ac to
874052a
Compare
|
Not sure why this is needed ? Since only the ErrorPlugin transform to HttpException AFAIK. Also you can configure the ErrorPlugin to only throw when response status code is >= 500. |
|
@joelwurtz indeed the response exception is an edge case, the expected exceptions are transfer problems. but i think it still does make sense. however, what would be more relevant is to look at non exception responses to check them for server side errors and retry those as well. |
|
I like this. I also think it is strange that we only consider exceptions. Why dont we also check the response? Ie this plugin is useless without the ErrorPlugin. |
|
we should certainly change the decider function to accept a ResponseInterface inside it then |
874052a to
eb9ec50
Compare
|
i created #126 to discuss handling server error responses in addition to exceptions. please give your input there. ok if we merge the tweak for exception handling here separately? |
eb9ec50 to
66bf4d6
Compare
|
this is only about the exception - okay if we merge it? |
|
Thank you |
What's in this PR?
Do not retry if the error is caused by the server returning a HTTP error code indicating that the request was bad.
Why?
There is no point in retrying those.
Checklist
To Do