Taxum / @taxum/core / util / ClientError
Class: ClientError
Defined in: util/client-error.ts:19
ClientError
represents any error thrown due to issues with client requests.
This error is generally used by built-in extractors and middleware. You can check for this error in your own error handler to create responses matching your own API error format.
ClientError
is not extending Error
on purpose, but instead only implements it. This allows us to avoid the performance penality of stack traces on errors which are used for control flow.
Extended by
ContentTooLargeError
ValidationError
MissingFormDataContentTypeError
MissingJsonContentTypeError
MalformedJsonError
UnauthorizedError
Implements
Constructors
Constructor
new ClientError(
status
,message
):ClientError
Defined in: util/client-error.ts:23
Parameters
status
message
string
Returns
ClientError
Properties
message
readonly
message:string
Defined in: util/client-error.ts:21
Implementation of
Error.message
status
readonly
status:StatusCode
Defined in: util/client-error.ts:20
Accessors
name
Get Signature
get name():
string
Defined in: util/client-error.ts:28
Returns
string
Implementation of
Error.name
Methods
[TO_HTTP_RESPONSE]()
[TO_HTTP_RESPONSE]():
HttpResponse
Defined in: util/client-error.ts:32
Returns
Implementation of
ToHttpResponse.[TO_HTTP_RESPONSE]