Course lesson

Resubscribe to an Observable on Error with RxJS retry

Besides catch, the other commonly used error handling operator is retry(). This lessons teaches how retry() and retryWhen() detect errors and how they re-subscribe to the source, besides highlighting its real-world applications.

Duration
4 min
Access
Pro
Transcript
Available

Besides catch, the other commonly used error handling operator is retry(). This lessons teaches how retry() and retryWhen() detect errors and how they re-subscribe to the source, besides highlighting its real-world applications.

🚨 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. To link together multiple Observables and Operators, the method is a bit different. You call zip first, then list your Observables, your functions, then pipe your Operators.