DEV Community


Discussion on: Error Handling in RxJS — Building an RxJS PubSub

deanius profile image
Dean Radcliffe Author

If you could write it up, then sure it could be achieved without much exertion :)

This is not to say that you can't do what you describe in raw RxJS, simply that may not be the most readable and approachable for beginners. And I have doubts as to whether a good default is to throw an unchecked error, interrupting the producer, and possibly crashing the process (if NodeJS)

Also, notice that in in my example there's no keeping around of a subscription object (a common point of confusion, and a place where reactive code becomes more imperative).

So please, show us the best way you think. And watch this awesome talk. It's not easy to do errors in RxJS that's for sure, I think there's plenty of room for innovation.