Skip to content
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

action subscribers would receive a call even when the action failed #1625

Closed

Conversation

fabalint
Copy link

@fabalint fabalint commented Oct 4, 2019

That cause might be a promise.rejection or js error.

This way the action subscribers of the 'after' would not miss the end of the action,
as they would receive the existing 'action' and 'state' parameters, and the additional 'isSuccess' and 'errorResult' values.
This applies for the then-side of the promise too, but there they would receive the result.

The true/false value might be useful for after action handlers, but the result might be too tempting to be used for modification for example, might be that too much info is handled out in this way. The same goes for the success-side of the after subscribers too.

While reviewing mind that: I cannot access github directly (firewalls), so this was a manual insertion of the locally working code. Typos might came along! (: In case there is a problem, tell me and I fix that, or say a thank you for your fix (:

…promise.reject, js error)

This way the action subscribers of the 'after' would not miss the end of the action.
The true/false value might be useful for after action handlers, but the result might be too tempting to be used for modification for example, might be that too much info is handled out in this way. The same goes for the success-side of the after subscribers too.
To test the reject and resolve software paths
@kiaking
Copy link
Member

kiaking commented Apr 21, 2020

Thanks for the PR! But I think this can be handle by #1531 where we define dedicated error handling hook instead of handling inside single after hook.

Let me followup on that PR and see how it goes.

kiaking pushed a commit that referenced this pull request May 8, 2020
close #1489 #1558 #1625 

Co-authored-by: Joe Plahitko <joseph.plahitko@egov.com>
@kiaking
Copy link
Member

kiaking commented May 8, 2020

New error handler is added via #1740 👍 You may catch errors there.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants