From 03784e7005646d987eeda0a949cfb43e9505d7b6 Mon Sep 17 00:00:00 2001 From: Pranav C Date: Wed, 7 Feb 2024 12:26:46 +0000 Subject: [PATCH] fix: missing validation error message --- packages/nocodb/src/helpers/apiHelpers.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/nocodb/src/helpers/apiHelpers.ts b/packages/nocodb/src/helpers/apiHelpers.ts index 33abe8ae2c..db033aaa9c 100644 --- a/packages/nocodb/src/helpers/apiHelpers.ts +++ b/packages/nocodb/src/helpers/apiHelpers.ts @@ -45,7 +45,7 @@ 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; + const errors: ErrorObject[] | null | undefined = ajv.errors || validate.errors; // If the request body is invalid, throw error with error message and errors NcError.ajvValidationError({