Skip to content
This repository was archived by the owner on Jul 9, 2026. It is now read-only.

Latest commit

 

History

History
110 lines (60 loc) · 2.12 KB

File metadata and controls

110 lines (60 loc) · 2.12 KB

@panenco/papi / Exports / ValidationError

Class: ValidationError<T>

Http error with status code 400

Returns a JSON error map of input validation errors

Type parameters

Name
T

Hierarchy

Table of contents

Constructors

Properties

Constructors

constructor

new ValidationError<T>(errors)

Type parameters

Name
T

Parameters

Name Type
errors { [K in string | number | symbol]?: string | object | string[] }

Overrides

BadRequest.constructor

Defined in

contracts/errors/validation.error.ts:12

Properties

code

code: number

Inherited from

BadRequest.code

Defined in

contracts/errors/errorBase.error.ts:9


reason

reason: string

Inherited from

BadRequest.reason

Defined in

contracts/errors/errorBase.error.ts:10


payload

Optional payload: object

Inherited from

BadRequest.payload

Defined in

contracts/errors/errorBase.error.ts:11


errors

errors: { [K in string | number | symbol]?: string | object | string[] }

Defined in

contracts/errors/validation.error.ts:11