Type Alias: OnErrorHook
type OnErrorHook = (context) =>
| undefined
| Promise<undefined>
| ErrorHookResult
| Promise<ErrorHookResult>;
Defined in: hooks/types.ts:354
Hook called when an error occurs.
Can be used for:
- Error logging
- Error transformation
- Recovery strategies
- Alerting
Parameters
| Parameter | Type |
|---|---|
context | ErrorHookContext |
Returns
| undefined | Promise<undefined> | ErrorHookResult | Promise<ErrorHookResult>