FallbackOptions
Defined in: src/fallback.ts:4
Type Parameters
Section titled “Type Parameters”T
Properties
Section titled “Properties”fallbackAction?
Section titled “fallbackAction?”
optionalfallbackAction?: (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.
Parameters
Section titled “Parameters”OutcomeArgs<T>
Returns
Section titled “Returns”MaybePromise<T>
fallbackValue?
Section titled “fallbackValue?”
optionalfallbackValue?:T
Defined in: src/fallback.ts:11
A fixed substitute value (cockatiel’s fallback(policy, value)).
optionalname?:string
Defined in: src/fallback.ts:5
onFallback?
Section titled “onFallback?”
optionalonFallback?: (args) =>MaybePromise<void>
Defined in: src/fallback.ts:12
Parameters
Section titled “Parameters”OutcomeArgs<T>
Returns
Section titled “Returns”MaybePromise<void>
shouldHandle?
Section titled “shouldHandle?”
optionalshouldHandle?: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.