-
Notifications
You must be signed in to change notification settings - Fork 18
Don't retry upon *any* 5xx status code #4
Comments
Retry on |
also 503 (503 is iirc what we give if unfreeze is taking too long (and 502 when there is an issue which is less likely to solve on it's own) And also 500 might be worth retrying since it's the generic something went wrong (but in that case a longer/steeper retry would make sense. for cases like "overloaded cosmos" etc |
@OlliV that's exactly what I said. We should retry on the ones I listed, but not on any |
Retrying within |
That's why maybe opts could contain a "retryIf" function that gets the response and tells if it should retry. If one hands in an array of numbers then this implicit for a function checking those status codes. |
Retrying was implemented here because it made sense to have a shared module that can do it for the backend code at the company, instead of copying and pasting the same handling to every service. Now you see that this is actually a separate module, and not "baked in" feature, so you can easily just drop it and use the other parts of the modular library. There was an example somewhere in the README files. |
501 for example means Not Implemented. ie: not worth retrying.
500
502
503
504
make sense instead.
The text was updated successfully, but these errors were encountered: