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

ActionSubscribersObject.after() hook will not be called if action results in a rejected promise #1489

Closed
jmplahitko opened this issue Jan 17, 2019 · 1 comment · May be fixed by rpocklin/phoenix#2
Labels
enhancement New feature or request

Comments

@jmplahitko
Copy link
Contributor

Version

3.1.0

Reproduction link

https://codepen.io/jmplahitko/pen/EGzMPG

Steps to reproduce

With console open:
Click Resolved button: before hook consoles, action consoles, after hook consoles.
Click Rejected button: before hook consoles, action consoles, after hook does not console.

What is expected?

If an action results in a rejected promise (for instance, in the case where an HTTP call results in an error), ActionSubscribersObject.after() hooks should still be called.

What is actually happening?

If an action results in a rejected promise, ActionSubscribersObject.after() hooks are not called.


This was found when integrating with the new ActionSubscribersObject for turning spinners on and off. In the case of an HTTP call resulting in an error, spinners don't go away. Hope this helps.

@kiaking kiaking added the enhancement New feature or request label Apr 23, 2020
@kiaking
Copy link
Member

kiaking commented Apr 23, 2020

#1531 might solve this one.

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

Successfully merging a pull request may close this issue.

2 participants