@bearnjs/rest
    Preparing search index...

    Type Alias ErrorHandler<TParams, TQuery, TBody, TRes>

    ErrorHandler: (
        err: Error,
        req: Request<TParams, TQuery, TBody>,
        res: Response<TRes>,
        next?: NextFunction,
    ) => void & (
        err: Error,
        req: Request,
        res: Response,
        next?: NextFunction,
    ) => void

    Global error handler signature.

    Type Parameters

    • TParams extends Record<string, string> = Record<string, string>
    • TQuery extends Record<string, string> = Record<string, string>
    • TBody extends JsonValue = JsonValue
    • TRes extends JsonValue = JsonValue

    Error being handled

    Request object

    Response object

    Next function

    ErrorHandler