-
-
Notifications
You must be signed in to change notification settings - Fork 2k
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
feat(effects): resubscribe to effects on error #1881
Conversation
adjust some spacing
Also refactored |
Preview docs changes for 8096171 at https://previews.ngrx.io/pr1881-8096171/ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The git commit message needs to indicate the breaking change also
Co-Authored-By: Brandon <robertsbt@gmail.com>
Preview docs changes for c6b9ded at https://previews.ngrx.io/pr1881-c6b9ded/ |
Preview docs changes for 1ac0665 at https://previews.ngrx.io/pr1881-1ac0665/ |
Co-Authored-By: Tim Deschryver <28659384+timdeschryver@users.noreply.github.com> Co-Authored-By: Brandon <robertsbt@gmail.com>
Preview docs changes for 2041346 at https://previews.ngrx.io/pr1881-2041346/ |
Preview docs changes for cf21508 at https://previews.ngrx.io/pr1881-cf21508/ |
PR Checklist
Please check if your PR fulfills the following requirements:
PR Type
What kind of change does this PR introduce?
What is the current behavior?
When Errors happen in the main Actions stream that error is reported and the stream is closed
Closes # #1851
What is the new behavior?
For
{dispatch: true}
, which is the default Effect option, if the error occurs in the main actions stream, the effect will be resubscribed. This could result in unusual behavior (in cases where operators likestartWith
are used).Resubscriptions can be turned off by setting
{resubscribeOnError: false}
in the effect metadata.Does this PR introduce a breaking change?
BREAKING CHANGE:
Prior to introduction of automatic resubscriptions on errors, all effects had effectively
{resubscribeOnError: false}
behavior. For the rare cases when this is still wanted please add{resubscribeOnError: false}
to the effect metadata.BEFORE:
AFTER:
Other information