From 316d9c536a87ff1a698f2302fee8bb8e8cece280 Mon Sep 17 00:00:00 2001 From: Pranav C Date: Wed, 12 Apr 2023 17:04:09 +0530 Subject: [PATCH] fix: response with default error status as 400 Signed-off-by: Pranav C --- .../src/filters/global-exception/global-exception.filter.ts | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/packages/nocodb-nest/src/filters/global-exception/global-exception.filter.ts b/packages/nocodb-nest/src/filters/global-exception/global-exception.filter.ts index 1f992741b7..772c9d04ca 100644 --- a/packages/nocodb-nest/src/filters/global-exception/global-exception.filter.ts +++ b/packages/nocodb-nest/src/filters/global-exception/global-exception.filter.ts @@ -51,9 +51,8 @@ export class GlobalExceptionFilter implements ExceptionFilter { if (exception.getStatus?.()) { response.status(exception.getStatus()).json(exception.getResponse()); } else { - response.status(500).json({ - statusCode: 500, - message: 'Internal server error', + response.status(400).json({ + msg: exception.message, }); } }