Methods
getErrorFromHttpStatus(status)
Get an error class based on HTTP status code.
Parameters:
Name | Type | Description |
---|---|---|
status |
number | The HTTP status code. |
Returns:
The HTTP error class.
getErrorInstanceFromHttpStatus(status, messageopt, …parameters)
Get an error instance based on HTTP status code.
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
status |
number | The HTTP status code. | |
message |
string |
<optional> |
The error message. |
parameters |
* |
<repeatable> |
The error parameters. |
Returns:
The HTTP error instance.
getDefaultMessageFromHttpStatus(status)
Get default message based on HTTP status code.
Parameters:
Name | Type | Description |
---|---|---|
status |
number | The HTTP status code. |
Returns:
The default HTTP status message.
- Type
- string
getHttpErrorMapping()
Get all HTTP error mapped with the appropriate HTTP status code.
Returns:
The HTTP error mapping.
- Type
- object.<number, object.<string, (string|HttpError)>>