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