rescue()
On upstream error, switches to a fallback store returned by fn(error) (Tier 2).
Signature
ts
function rescue<A>(fn: (error: unknown) => Store<A>): StoreOperator<A, A>Parameters
| Parameter | Type | Description |
|---|---|---|
fn | (error: unknown) => Store<A> | Maps the error to a replacement Store<A>. |
Returns
StoreOperator<A, A> — follows primary until error, then the fallback stream.