Skip to content

mapErrorStrategy

mapErrorStrategy<T, E2>(mapper, name?): StrategyDefinition<T, E2> & object

Defined in: src/fallback.ts:64

Turns every failure of the strategies added after it into your own error (e.g. a domain error), which joins the settle() error type in their place: mapErrorStrategy((e) => new PaymentUnavailable({ cause: e })). Caller aborts pass through.

T = any

E2 = never

(error, context) => E2

string = 'MapError'

StrategyDefinition<T, E2> & object