In short: How to continue listening after an error in a stream without placing .catchbefore each .subscribe?
If you need more information, they are here:
Suppose I have a current user subject or zero. Sometimes I get data from the API and post a topic. It updates the view accordingly. But at some point, an error occurs on my server, and I want my application to continue to work as before, but will report some places about the error and KEEP, listening to my question.
Initially, I thought that if I just do userSubject.error(...)it only activates the callbacks .catchand errorto subscribers and will miss all the handlers and success chain. And if, after I call userSubject.next(...), all my conversations and subscribers will work as before
BUT, unfortunately, this is not so. After the first uncaught, .errorhe unsubscribes subscribers from the stream and no longer works.
So my question is: why ??? And what if I want to handle the value normally null, but also handle errors only in some places?
Here is a link to the RxJs source code, where the subscriber unsubscribes with an error
https://github.com/ReactiveX/rxjs/blob/master/src/Subscriber.ts#L140