-
Notifications
You must be signed in to change notification settings - Fork 150
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
Refactor retries #772
Comments
cc @fjtirado |
It's seems like this is another style of error representation as which describe in #770 . Should we keep use an unified representation? |
@lsytj0413 No, not really, though the two issues are undeniably linked. I chose to split it in 2 different issues for the sake of simplicity and in order to avoid following God PRs. Does that make sense to you? |
Closed as resolved by 1.0.0-alpha1, and therefore as part of #843 |
What would you like to be added?
Refactor
retries
Why is this needed?
Retries are one of the many actions that could be undertaken when an error is caught.
The current
retry (strategy) definition
should IMO be referenced by an handler that undertakes a retry upon given kinds of error (or upon all errors, possibly except some). It actually mixes both the handler and the retry concerns, and as such limit possibilities that we could open with my proposal.What is your proposal?
Create a new
errorHandler
definition, that would allow users to define the errors they want to catch (or not to catch) and how they want to react (or not to react) to them.An
errorHandler
could look like the following:An action could then reference it like so:
The text was updated successfully, but these errors were encountered: