talawa-api / Exports / libraries/errors/validationError / ValidationError
libraries/errors/validationError.ValidationError
This class detects validation errors and sends those errors to the superclass ApplicationError.
-
↳
ValidationError
• new ValidationError(errors?
, message?
): ValidationError
Name | Type | Default value |
---|---|---|
errors |
InterfaceError [] |
[] |
message |
string |
"Validation error" |
src/libraries/errors/validationError.ts:7
• errors: InterfaceError
[]
src/libraries/errors/applicationError.ts:11
• httpCode: number
src/libraries/errors/applicationError.ts:12
• message: string
node_modules/typescript/lib/lib.es5.d.ts:1076
• name: string
node_modules/typescript/lib/lib.es5.d.ts:1075
• Optional
stack: string
node_modules/typescript/lib/lib.es5.d.ts:1077
▪ Static
Optional
prepareStackTrace: (err
: Error
, stackTraces
: CallSite
[]) => any
Optional override for formatting stack traces
See
https://v8.dev/docs/stack-trace-api#customizing-stack-traces
▸ (err
, stackTraces
): any
Optional override for formatting stack traces
Name | Type |
---|---|
err |
Error |
stackTraces |
CallSite [] |
any
See
https://v8.dev/docs/stack-trace-api#customizing-stack-traces
ApplicationError.prepareStackTrace
node_modules/@types/node/globals.d.ts:28
▪ Static
stackTraceLimit: number
ApplicationError.stackTraceLimit
node_modules/@types/node/globals.d.ts:30
▸ captureStackTrace(targetObject
, constructorOpt?
): void
Create .stack property on a target object
Name | Type |
---|---|
targetObject |
object |
constructorOpt? |
Function |
void
ApplicationError.captureStackTrace
node_modules/@types/node/globals.d.ts:21