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