Emitting RxJS Observable Fallback Values

Image by Foto-Rabe from Pixabay

Scenario

Approach

oops.pipe(catchError(err => of('OOOPS')))

Demo

let catchMeIfYouCan: Observable<string> = throwError("Catch me if you can");catchMeIfYouCan.subscribe(() => console.log("Next handler will not execute"),e => console.log(e),() => console.log("Completion handler will not execute"));

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store