Skip to content

Taxum / @taxum/core / middleware/limit / ContentTooLargeError

Class: ContentTooLargeError

Defined in: middleware/limit.ts:80

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.

Extends

Constructors

Constructor

new ContentTooLargeError(limit): ContentTooLargeError

Defined in: middleware/limit.ts:81

Parameters

limit

number

Returns

ContentTooLargeError

Overrides

ClientError.constructor

Properties

message

readonly message: string

Defined in: util/client-error.ts:21

Inherited from

ClientError.message


status

readonly status: StatusCode

Defined in: util/client-error.ts:20

Inherited from

ClientError.status

Accessors

name

Get Signature

get name(): string

Defined in: util/client-error.ts:28

Returns

string

Inherited from

ClientError.name

Methods

[TO_HTTP_RESPONSE]()

[TO_HTTP_RESPONSE](): HttpResponse

Defined in: util/client-error.ts:32

Returns

HttpResponse

Inherited from

ClientError.[TO_HTTP_RESPONSE]