Skip to main content

Class: RequestValidationError

@ts-rest/nest.RequestValidationError

Hierarchy

  • BadRequestException

    RequestValidationError

Constructors

constructor

new RequestValidationError(pathParams, headers, query, body)

Parameters

NameType
pathParamsnull | ZodError<any>
headersnull | ZodError<any>
querynull | ZodError<any>
bodynull | ZodError<any>

Overrides

BadRequestException.constructor

Defined in

libs/ts-rest/nest/src/lib/ts-rest-nest-handler.ts:51

Properties

body

body: null | ZodError<any>

Defined in

libs/ts-rest/nest/src/lib/ts-rest-nest-handler.ts:55


cause

cause: unknown

Inherited from

BadRequestException.cause

Defined in

node_modules/.pnpm/@nestjs+common@10.1.2_reflect-metadata@0.1.13_rxjs@7.8.1/node_modules/@nestjs/common/exceptions/http.exception.d.ts:58


headers

headers: null | ZodError<any>

Defined in

libs/ts-rest/nest/src/lib/ts-rest-nest-handler.ts:53


message

message: string

Inherited from

BadRequestException.message

Defined in

node_modules/.pnpm/typescript@5.2.2/node_modules/typescript/lib/lib.es5.d.ts:1068


name

name: string

Inherited from

BadRequestException.name

Defined in

node_modules/.pnpm/typescript@5.2.2/node_modules/typescript/lib/lib.es5.d.ts:1067


pathParams

pathParams: null | ZodError<any>

Defined in

libs/ts-rest/nest/src/lib/ts-rest-nest-handler.ts:52


query

query: null | ZodError<any>

Defined in

libs/ts-rest/nest/src/lib/ts-rest-nest-handler.ts:54


stack

Optional stack: string

Inherited from

BadRequestException.stack

Defined in

node_modules/.pnpm/typescript@5.2.2/node_modules/typescript/lib/lib.es5.d.ts:1069


prepareStackTrace

Static Optional prepareStackTrace: (err: Error, stackTraces: CallSite[]) => any

Type declaration

▸ (err, stackTraces): any

Optional override for formatting stack traces

Parameters
NameType
errError
stackTracesCallSite[]
Returns

any

See

https://v8.dev/docs/stack-trace-api#customizing-stack-traces

Inherited from

BadRequestException.prepareStackTrace

Defined in

node_modules/.pnpm/@types+node@18.11.9/node_modules/@types/node/globals.d.ts:11


stackTraceLimit

Static stackTraceLimit: number

Inherited from

BadRequestException.stackTraceLimit

Defined in

node_modules/.pnpm/@types+node@18.11.9/node_modules/@types/node/globals.d.ts:13

Methods

getResponse

getResponse(): string | object

Returns

string | object

Inherited from

BadRequestException.getResponse

Defined in

node_modules/.pnpm/@nestjs+common@10.1.2_reflect-metadata@0.1.13_rxjs@7.8.1/node_modules/@nestjs/common/exceptions/http.exception.d.ts:68


getStatus

getStatus(): number

Returns

number

Inherited from

BadRequestException.getStatus

Defined in

node_modules/.pnpm/@nestjs+common@10.1.2_reflect-metadata@0.1.13_rxjs@7.8.1/node_modules/@nestjs/common/exceptions/http.exception.d.ts:69


initCause

initCause(): void

Configures error chaining support

Returns

void

See

Inherited from

BadRequestException.initCause

Defined in

node_modules/.pnpm/@nestjs+common@10.1.2_reflect-metadata@0.1.13_rxjs@7.8.1/node_modules/@nestjs/common/exceptions/http.exception.d.ts:65


initMessage

initMessage(): void

Returns

void

Inherited from

BadRequestException.initMessage

Defined in

node_modules/.pnpm/@nestjs+common@10.1.2_reflect-metadata@0.1.13_rxjs@7.8.1/node_modules/@nestjs/common/exceptions/http.exception.d.ts:66


initName

initName(): void

Returns

void

Inherited from

BadRequestException.initName

Defined in

node_modules/.pnpm/@nestjs+common@10.1.2_reflect-metadata@0.1.13_rxjs@7.8.1/node_modules/@nestjs/common/exceptions/http.exception.d.ts:67


captureStackTrace

Static captureStackTrace(targetObject, constructorOpt?): void

Create .stack property on a target object

Parameters

NameType
targetObjectobject
constructorOpt?Function

Returns

void

Inherited from

BadRequestException.captureStackTrace

Defined in

node_modules/.pnpm/@types+node@18.11.9/node_modules/@types/node/globals.d.ts:4


createBody

Static createBody(nil, message, statusCode): HttpExceptionBody

Parameters

NameType
nilnull | ""
messageHttpExceptionBodyMessage
statusCodenumber

Returns

HttpExceptionBody

Inherited from

BadRequestException.createBody

Defined in

node_modules/.pnpm/@nestjs+common@10.1.2_reflect-metadata@0.1.13_rxjs@7.8.1/node_modules/@nestjs/common/exceptions/http.exception.d.ts:70

Static createBody(message, error, statusCode): HttpExceptionBody

Parameters

NameType
messageHttpExceptionBodyMessage
errorstring
statusCodenumber

Returns

HttpExceptionBody

Inherited from

BadRequestException.createBody

Defined in

node_modules/.pnpm/@nestjs+common@10.1.2_reflect-metadata@0.1.13_rxjs@7.8.1/node_modules/@nestjs/common/exceptions/http.exception.d.ts:71

Static createBody<Body>(custom): Body

Type parameters

NameType
Bodyextends Record<string, unknown>

Parameters

NameType
customBody

Returns

Body

Inherited from

BadRequestException.createBody

Defined in

node_modules/.pnpm/@nestjs+common@10.1.2_reflect-metadata@0.1.13_rxjs@7.8.1/node_modules/@nestjs/common/exceptions/http.exception.d.ts:72


extractDescriptionAndOptionsFrom

Static extractDescriptionAndOptionsFrom(descriptionOrOptions): DescriptionAndOptions

Utility method used to extract the error description and httpExceptionOptions from the given argument. This is used by inheriting classes to correctly parse both options.

Parameters

NameType
descriptionOrOptionsstring | HttpExceptionOptions

Returns

DescriptionAndOptions

the error description and the httpExceptionOptions as an object.

Inherited from

BadRequestException.extractDescriptionAndOptionsFrom

Defined in

node_modules/.pnpm/@nestjs+common@10.1.2_reflect-metadata@0.1.13_rxjs@7.8.1/node_modules/@nestjs/common/exceptions/http.exception.d.ts:80


getDescriptionFrom

Static getDescriptionFrom(descriptionOrOptions): string

Parameters

NameType
descriptionOrOptionsstring | HttpExceptionOptions

Returns

string

Inherited from

BadRequestException.getDescriptionFrom

Defined in

node_modules/.pnpm/@nestjs+common@10.1.2_reflect-metadata@0.1.13_rxjs@7.8.1/node_modules/@nestjs/common/exceptions/http.exception.d.ts:73


getHttpExceptionOptionsFrom

Static getHttpExceptionOptionsFrom(descriptionOrOptions): HttpExceptionOptions

Parameters

NameType
descriptionOrOptionsstring | HttpExceptionOptions

Returns

HttpExceptionOptions

Inherited from

BadRequestException.getHttpExceptionOptionsFrom

Defined in

node_modules/.pnpm/@nestjs+common@10.1.2_reflect-metadata@0.1.13_rxjs@7.8.1/node_modules/@nestjs/common/exceptions/http.exception.d.ts:74