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

fix(component-store): make synchronous updater errors catchable #3490

Conversation

markostanimirovic
Copy link
Member

PR Checklist

Please check if your PR fulfills the following requirements:

PR Type

What kind of change does this PR introduce?

[x] Bugfix
[ ] Feature
[ ] Code style update (formatting, local variables)
[ ] Refactoring (no functional changes, no api changes)
[ ] Build related changes
[ ] CI related changes
[ ] Documentation content changes
[ ] Other... Please describe:

What is the current behavior?

Closes #3266

What is the new behavior?

All synchronous errors are now catchable. Also, error handling is changed - an error will not be emitted to the stateSubject$ anymore, it will be thrown instead.

Does this PR introduce a breaking change?

[ ] Yes
[x] No

As we discussed at the last team meeting, this should not be considered a breaking change.

@netlify
Copy link

netlify bot commented Jul 15, 2022

Deploy Preview for ngrx-io canceled.

Built without sensitive environment variables

Name Link
🔨 Latest commit c3b3e00
🔍 Latest deploy log https://app.netlify.com/sites/ngrx-io/deploys/62e1a09ed51c630009a3db72

modules/component-store/spec/component-store.spec.ts Outdated Show resolved Hide resolved
modules/component-store/spec/component-store.spec.ts Outdated Show resolved Hide resolved
return EMPTY;
}

return throwError(() => error);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice! So this will error the async updater but not the general state$ 👍

@markostanimirovic markostanimirovic force-pushed the fix/component-store/catch-updater-errors branch from 36653bc to c3b3e00 Compare July 27, 2022 20:31
Copy link
Member

@alex-okrushko alex-okrushko left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fantastic work @markostanimirovic 👍

@alex-okrushko alex-okrushko merged commit 1a906fd into ngrx:master Aug 15, 2022
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.

ComponentStore updater errors are not catchable
3 participants