Skip to content

basalt / fastify/src / RequestValidationError

Class: RequestValidationError ​

Defined in: http/src/errors.ts:10

Body/query/params validation failure — becomes a standardized 400 response.

Extends ​

Constructors ​

Constructor ​

> new RequestValidationError(part, issues): RequestValidationError

Defined in: http/src/errors.ts:11

Parameters ​

part ​

"body" | "query" | "params"

issues ​

ValidationIssue[]

Returns ​

RequestValidationError

Overrides ​

BasaltError.constructor

Properties ​

code ​

> readonly code: string

Defined in: core/src/errors.ts:25

Inherited from ​

BasaltError.code


details? ​

> readonly optional details?: Record<string, unknown>

Defined in: core/src/errors.ts:28

Structured payload passed to the constructor, exactly as given (never sanitised here).

Inherited from ​

BasaltError.details


issues ​

> readonly issues: ValidationIssue[]

Defined in: http/src/errors.ts:13


part ​

> readonly part: "body" | "query" | "params"

Defined in: http/src/errors.ts:12

Released under the MIT License.