The message of the error.
The context information, for the error handler.
A reference to the service that generates HTTP status codes. This
is in case the implementation wants to use a special version from
the container; otherwise, it will use the statuses
library
directly.
Readonly
_contextThe context information that can be provided to the error, and picked by the error handler.
Readonly
_dateThe date of when the error was generated.
Protected
_statusesThe service that generates HTTP status codes.
Context information related to the error.
The date of when the error was generated.
Information about the error that can be included in a response. This is set using the
response
key in the context
option.
An HTTP status code related to the error. This is set using the status
key on the
context
.
Protected
_parseUtility method that formats the context before saving it in the instance:
status
as a string
, it will try to replace it with
its actual status code from the statuses
service.The original context sent to the constructor.
A simple subclass of
Error
but with support for context information.