mogami-stream - v0.2.0
    Preparing search index...

    Function catchError

    • Recovers from an upstream failure by switching once to a fallback source returned by handler.

      Waits for the failed upstream stage to finish cleaning up before calling handler. Execution cancellation, cleanup errors, downstream errors, and errors thrown by handler or the replacement source are not caught. handler may return a source or a promise of one, and receives the active stage's AbortSignal. Use context.acquire(acquire, release) for resources opened during recovery; plain fallback sources returned after cancellation are never opened or closed by the library.

      Type Parameters

      • U

      Parameters

      Returns <T>(source: AsyncIterable<T>) => Stream<U | T>