-
Notifications
You must be signed in to change notification settings - Fork 37
Success condition can be a failure #33
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
Comments
@grogdotcom did you find a solution to this? I'm trying to do the same thing. |
@GEverding No there is no good solution. what I ended up doing was wrapping the future in a Try
|
I also need this, would be nice for it to be built into the library. |
I'm not sure if a library change is needed, I just defined an inline Success that treated exceptions I didn't want to retry as "success" - wrapped in a scala.util.Try
This worked fine |
I have a method that I want to retry that could result in multiple exceptions. Only one of them I want to retry on the other ones I want to consider as a success and throw that exception.
The Success condition for the Policy is only checked within a
.map
of the future being evaluated so a failed future will always result in a retry.Is there a way to only retry on certain failures without having to wrap the content of the futures in a Try or Either?
The text was updated successfully, but these errors were encountered: