Skip to content

FallbackOptions

Defined in: src/fallback.ts:4

T

optional fallbackAction?: (args) => MaybePromise<T>

Defined in: src/fallback.ts:9

Produces the substitute value; throwing here makes the execution fail with that error. Give either this or fallbackValue.

OutcomeArgs<T>

MaybePromise<T>


optional fallbackValue?: T

Defined in: src/fallback.ts:11

A fixed substitute value (cockatiel’s fallback(policy, value)).


optional name?: string

Defined in: src/fallback.ts:5


optional onFallback?: (args) => MaybePromise<void>

Defined in: src/fallback.ts:12

OutcomeArgs<T>

MaybePromise<void>


optional shouldHandle?: ShouldHandle<OutcomeArgs<T>>

Defined in: src/fallback.ts:7

Default: every failure except aborts and 4xx client errors, including an open circuit or a full limiter.