Skip to content

API reference / @backpack/error-handling / promises / catchAll

Function: catchAll()

ts
function catchAll<TResult>(...onErrorCallbacks): (error) => Promise<TResult>;

Applies all given catchAll() callbacks in order, returning the resulting Promise.

Type Parameters

Type Parameter
TResult

Parameters

ParameterType
...onErrorCallbacks(_) => TResult[]

Returns

ts
(error): Promise<TResult>;

Parameters

ParameterType
errorunknown

Returns

Promise<TResult>