Browse Source

fix: response with default error status as 400

Signed-off-by: Pranav C <pranavxc@gmail.com>
pull/5444/head
Pranav C 2 years ago
parent
commit
316d9c536a
  1. 5
      packages/nocodb-nest/src/filters/global-exception/global-exception.filter.ts

5
packages/nocodb-nest/src/filters/global-exception/global-exception.filter.ts

@ -51,9 +51,8 @@ export class GlobalExceptionFilter implements ExceptionFilter {
if (exception.getStatus?.()) { if (exception.getStatus?.()) {
response.status(exception.getStatus()).json(exception.getResponse()); response.status(exception.getStatus()).json(exception.getResponse());
} else { } else {
response.status(500).json({ response.status(400).json({
statusCode: 500, msg: exception.message,
message: 'Internal server error',
}); });
} }
} }

Loading…
Cancel
Save