Angular Master Podcast cover image

AMP 4: Target RxJS part I with Michael Hladky

Angular Master Podcast

00:00

How to Reuse an Error Observable

If an observable error is it is basically gone, you cannot reuse it. You can trick the effect that an error observable is not reusable by using flattening operators. For example, whenever my value changes, I take this value, I take merge map and then I can run for example synchronous composition which could fail or go well. And no matter which of those cases appeared, the next value as it is merge map, it will recreate the new observable from scratch. Will basically drop the old one, create that new one. It's a nice trick to get an ongoing stream that is really not stopping when an error occurs.

Play episode from 40:55
Transcript

The AI-powered Podcast Player

Save insights by tapping your headphones, chat with episodes, discover the best highlights - and more!
App store bannerPlay store banner
Get the app