Class: MiddlewareError

MiddlewareError(message, statusCode, optionsopt)

Use this class if you want to display specific HTTP error page.

Uses the errorPages/error.njk template, but it can be overridden via options.

Constructor

new MiddlewareError(message, statusCode, optionsopt)

Create a new MiddlewareError

Parameters:
Name Type Attributes Description
message string

Error message

statusCode number

HTTP status code to return to the client

options Object <optional>

Additional options

Properties
Name Type Attributes Description
template string <optional>

Custom error template path

cause Error <optional>

Cause of the error

Source:

Classes

MiddlewareError