[ Web Proxy ]
URL:
Viewing: https://adminforth.dev/docs/api/Back/type-aliases/ExpressErrorCallbackFunction/ [Back]  [Original]

ExpressErrorCallbackFunction | Agent-first open-source admin panel framework
Skip to main content
On this page

ExpressErrorCallbackFunction

ExpressErrorCallbackFunction = (params) => void | Promise<void>

Callback called when an unhandled error is thrown inside an AdminForth API endpoint handler. Useful to report errors to external services (e.g. Sentry) or to do custom logging. Thrown errors / rejections from this callback are caught and logged, they do not affect the response.

Parameters

ParameterTypeDescription
params{ adminforth: IAdminForth; error: any; extra: HttpExtra; }-
params.adminforthIAdminForthAdminforth instance.
params.erroranyThe error thrown by the endpoint handler.
params.extraHttpExtraExtra HTTP information about the request which caused the error.

Returns

void | Promise<void>

Previous
DeleteResourceRecordResult
Next
FDataFilter

Web Proxy Viewer  |  New URL  |  Original Page