Error Handling
Handling errors within selectors
Let's take a look at the below example:
The catch is that when resetting the entire state, the object will no longer have those deeply nested properties (state.count.number.value
). Given the following code:
RxJS will automatically complete the stream under the hood if any error is thrown.
You have to disable suppressing errors using the suppressErrors
option:
This option allows to track errors and handle them.
Why does RxJS unsubscribe on error?
RxJS design guidelines provides a great explanation of this behavior.
Last updated