Skip to main content
zerotal

Documentation


Documentation / zerotal / index / ValidationError

Class: ValidationError

Defined in: packages/core/src/errors/ValidationError.ts:12

Raised when input validation fails.

Param

errors

Field name → list of messages for that field.

Extends

Constructors

Constructor

new ValidationError(message, errors): ValidationError

Defined in: packages/core/src/errors/ValidationError.ts:13

Parameters

message

string

errors

Record<string, string[]>

Returns

ValidationError

Overrides

HttpError.constructor

Properties

headers?

optional headers?: Record<string, string>

Defined in: packages/core/src/errors/HttpError.ts:15

Inherited from

HttpError.headers


errors

readonly errors: Record<string, string[]>

Defined in: packages/core/src/errors/ValidationError.ts:15


code

readonly code: string

Defined in: packages/core/src/errors/ZerotalError.ts:18

Inherited from

HttpError.code


status

readonly status: number = 500

Defined in: packages/core/src/errors/ZerotalError.ts:19

Inherited from

HttpError.status


context?

readonly optional context?: Record<string, unknown>

Defined in: packages/core/src/errors/ZerotalError.ts:20

Inherited from

HttpError.context