-
Notifications
You must be signed in to change notification settings - Fork 723
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
Overwrite Retryconditions #868
Comments
For now I have encapsulated the rest client into a wrapper type with receiver functions, which then add the retry conditions on each request to avoid repetition and client wide config. |
@wasserholz Thanks for reaching out. In the upcoming Resty v3, retry controls will be added to the Request level to prevent retrying on particular requests; refer to #752. |
@wasserholz, I thought I would check with you regarding my above comment. |
@wasserholz I thought I would check with you again. |
I'm closing it. |
Sorry for not answering earlier. The use case is following: But one specific endpoint needs to have a more granular check for specific error codes. e.g. fail on all error codes except error code 418 |
@wasserholz Thanks for getting back. So your use case is to apply only the request retry conditions, not the client retry conditions for the specific requests, right? |
- refactor retry conditions and hooks into accepting multiple values
Done! |
First of all, thanks for this great rest client.
Currently it is not possible to overwrite retry conditions on a request
Use case:
Most requests to a specific API should retry on any error except for one endpoint.
For that one endpoint I am creating an object and the endpoint returns 400 with an app error code specific to that endpoint. As the object exists, it is fine to not retry.
I have now a client wide retry on error,
AddRetryAfterErrorCondition()
, but for that one request I want it do use my customer retry function only. This would only work if I manually remove the client wide retry condition or use a new client for this specific request.It would be great to be able to overwrite client wide configuration in each request, so it is possible to avoid work-arounds.
The text was updated successfully, but these errors were encountered: