Handle Errors with RxJS catch

InstructorAndré Staltz

Share this video with your friends

Send Tweet

Most of the common RxJS operators are about transformation, combination or filtering, but this lesson is about a new category, error handling operators, and its most important operator: catch().

🚨 Since we are importing interval from RxJS, we don't need to preface our Observables with Rx.Observable. You can no longer .{operator}, you need to .pipe({operator}) instead. catch is deprecated, use catchError instead.

ganqqwerty
~ 6 years ago

I liked the example of < 0.5 very much!

Rich
~ 4 years ago

is catch() still an operator in the latest version?

Rich
~ 4 years ago

When I search Google I get more references to catchError(). Should I assume catchError() is the new catch() or do they have distinct use cases?