Skip to content

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

@jmplahitko

Description

@jmplahitko

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions