BACK
ReferenceretryWhen
Reference · 95

retryWhen

retryWhen

Deprecated
rxjs.dev

Retries source after an error when a notifier allows it.

Signature

retryWhen(notifier: (errors: Observable) => ObservableInput): MonoTypeOperatorFunction

What it does

Source errors flow into the notifier. When the notifier emits, source is subscribed again; if the notifier completes or errors, the retrying stops.

When to use

Supporting legacy backoff chains. In modern RxJS, use retry with a delay/count config.

Deprecated API

Marked deprecated in RxJS 7. In new code, use retry({ count, delay }).

See also

retry, catchError

script.ts // TypeScript
CONSOLE · Console output
Hit Run to see the result...