Constructor
new ClientError(code, message, help)
Initialises a ClientError with the given HTTP status code, the error message and
an optional debugging help text.
Parameters:
| Name | Type | Description |
|---|---|---|
code |
Code | HTTP status code for the error response |
message |
string | The error message |
help |
string | Optional debugging help text |
- Source:
Methods
Export() → {any}
Sanitises a ClientError object by getting rid of the code property. Sending the
code property client-side could make the impression that client shouldn't pay
attention to the HTTP response's status header and should code against the response
body's code property instead. That would be a bad design choice.
- Source:
Returns:
A ClientError object without the code.
- Type
- any