Skip to content

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).

T = any

C extends string = string

readonly C[]

(args) => MaybePromise<T>

Omit<FallbackOptions<T>, "fallbackAction" | "shouldHandle"> = {}

StrategyDefinition<T, never> & object