Class: DormValidationError
Defined in: src/validation/errors.ts:42
Thrown by create/update when validation fails. Carries all field errors in errors; the top-level field/code/etc. mirror the first one for convenience.
Extends
Error
Constructors
Constructor
new DormValidationError(
errors):DormValidationError
Defined in: src/validation/errors.ts:50
Parameters
errors
Returns
DormValidationError
Overrides
Error.constructor
Properties
errors
errors:
DormFieldError[]
Defined in: src/validation/errors.ts:43
field
field:
string
Defined in: src/validation/errors.ts:44
code
code:
string
Defined in: src/validation/errors.ts:45
expectedType
expectedType:
string
Defined in: src/validation/errors.ts:46
gotType
gotType:
string
Defined in: src/validation/errors.ts:47
description
description:
string
Defined in: src/validation/errors.ts:48
prepareStackTrace?
staticoptionalprepareStackTrace?: (err,stackTraces) =>any
Defined in: node_modules/@types/node/globals.d.ts:143
Optional override for formatting stack traces
Parameters
err
Error
stackTraces
CallSite[]
Returns
any
See
https://v8.dev/docs/stack-trace-api#customizing-stack-traces
Inherited from
Error.prepareStackTrace
stackTraceLimit
staticstackTraceLimit:number
Defined in: node_modules/@types/node/globals.d.ts:145
Inherited from
Error.stackTraceLimit
cause?
optionalcause?:unknown
Defined in: node_modules/typescript/lib/lib.es2022.error.d.ts:26
Inherited from
Error.cause
name
name:
string
Defined in: node_modules/typescript/lib/lib.es5.d.ts:1076
Inherited from
Error.name
message
message:
string
Defined in: node_modules/typescript/lib/lib.es5.d.ts:1077
Inherited from
Error.message
stack?
optionalstack?:string
Defined in: node_modules/typescript/lib/lib.es5.d.ts:1078
Inherited from
Error.stack
Methods
toJsonResponse()
toJsonResponse():
DormValidationResponse
Defined in: src/validation/errors.ts:63
A serializable body suitable for an HTTP JSON response.
Returns
captureStackTrace()
staticcaptureStackTrace(targetObject,constructorOpt?):void
Defined in: node_modules/@types/node/globals.d.ts:136
Create .stack property on a target object
Parameters
targetObject
object
constructorOpt?
Function
Returns
void
Inherited from
Error.captureStackTrace