Type Alias ErrorHandlerOptions

ErrorHandlerOptions: {
    response: ErrorHandlerResponseOptions;
    showErrors: boolean;
}

The customization options for the middleware.

Type declaration

  • response: ErrorHandlerResponseOptions

    The options for the default response the middleware will create.

  • showErrors: boolean

    If false, unknown errors will show a generic message instead of real message. And if true, it will not only show all kind of errors but it will also show the error stack.

    By "uknown errors", it means that are not AppError nor HTTPError.