fallbackOnStrategy
fallbackOnStrategy<
T,C>(codes,fallbackAction,options?):StrategyDefinition<T,never> &object
Defined in: src/fallback.ts:51
Fallback for specific error codes only: fallbackOnStrategy(['TIMEOUT', 'CIRCUIT_OPEN'], () => cached).
Those codes leave the settle() error type; others pass through (tenace’s withFallbackOn).
Type Parameters
Section titled “Type Parameters”T = any
C extends string = string
Parameters
Section titled “Parameters”readonly C[]
fallbackAction
Section titled “fallbackAction”(args) => MaybePromise<T>
options?
Section titled “options?”Omit<FallbackOptions<T>, "fallbackAction" | "shouldHandle"> = {}
Returns
Section titled “Returns”StrategyDefinition<T, never> & object