You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Create an observable that emits a value (just so that we know we've correctly subscribed to it) and then which errors after some time
Subscribe to it from the view twice:
With the async pipe: It will report the error correctly in the console
With the ngrxPush pipe: It won't report any error at all but the observable is in an error state and we won't receive any update which is super confusing
This happened and we were all super confused at work. Why is our view partially rendered (table getting all the rows asynchronously), while we've got no errors at all?
We opened our Redux devtool and saw that all of our data where there so it wasn't coming from the effect nor the reducers.
Eventually, figured out that it was coming from one of our selectors because an interface was poorly implemented at first and we were accessing a field which was sometimes null (therefore throwing an error from the selector, which was silently swallowed by the ngrxPush pipe).
Same behavior as the async pipe: throw errors instead of swallowing them silently.
This will let us notice while developing that something is wrong in the first place and it'll also let us correctly report to Sentry or any other provider that something went wrong and should be fixed.
Versions of NgRx, Angular, Node, affected browser(s) and operating system(s):
Minimal reproduction of the bug/regression with instructions:
https://stackblitz.com/edit/angular-ivy-qvtpja?file=src/app/app.component.ts
@ngrx/component
async
pipe: It will report the error correctly in the consolengrxPush
pipe: It won't report any error at all but the observable is in an error state and we won't receive any update which is super confusingThis happened and we were all super confused at work. Why is our view partially rendered (table getting all the rows asynchronously), while we've got no errors at all?
We opened our Redux devtool and saw that all of our data where there so it wasn't coming from the effect nor the reducers.
Eventually, figured out that it was coming from one of our selectors because an interface was poorly implemented at first and we were accessing a field which was sometimes
null
(therefore throwing an error from the selector, which was silently swallowed by thengrxPush
pipe).I read the whole documentation about this pipe and nothing mentions that behavior: https://ngrx.io/guide/component/push
async
pipengrxPush
pipeExpected behavior:
Same behavior as the
async
pipe: throw errors instead of swallowing them silently.This will let us notice while developing that something is wrong in the first place and it'll also let us correctly report to Sentry or any other provider that something went wrong and should be fixed.
Versions of NgRx, Angular, Node, affected browser(s) and operating system(s):
@ngrx/component
:12.3.0
Other information:
It seems to come from here:
platform/modules/component/src/core/cd-aware/cd-aware_creator.ts
Lines 74 to 76 in b67af2f
I would be willing to submit a PR to fix this issue
[x] Yes (Assistance is provided if you need help submitting a pull request) --> Done here so we have something to discuss at least 😸 #3101
[ ] No
The text was updated successfully, but these errors were encountered: