|
|
@ -45,7 +45,7 @@ export const validatePayload = (schema: string, payload: any) => { |
|
|
|
|
|
|
|
|
|
|
|
// If the request body is not valid, throw error
|
|
|
|
// If the request body is not valid, throw error
|
|
|
|
if (!valid) { |
|
|
|
if (!valid) { |
|
|
|
const errors: ErrorObject[] | null | undefined = ajv.errors; |
|
|
|
const errors: ErrorObject[] | null | undefined = ajv.errors || validate.errors; |
|
|
|
|
|
|
|
|
|
|
|
// If the request body is invalid, throw error with error message and errors
|
|
|
|
// If the request body is invalid, throw error with error message and errors
|
|
|
|
NcError.ajvValidationError({ |
|
|
|
NcError.ajvValidationError({ |
|
|
|