retry
signature: retry(number: number): Observable
retry(number: number): Observable
Retry an observable sequence a specific number of times should an error occur.
💡 Useful for retrying HTTP requests!
💡 If you only want to retry in certain cases, check out retryWhen
!
💡 For non error cases check out repeat
!
Examples
Example 1: Retry 2 times on error
( StackBlitz | jsBin | jsFiddle )
Additional Resources
retry 📰 - Official docs
retry - In Depth Dev Reference
Error handling operator: retry and retryWhen 🎥 💵 - André Staltz
📁 Source Code: https://github.com/ReactiveX/rxjs/blob/master/src/internal/operators/retry.ts
Last updated