Browse Source

fix: unnecessary error logs (#8527)

* fix: unnecessary error logs

* fix: reverse condition to improve readability

Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>

---------

Co-authored-by: mertmit <mertmit99@gmail.com>
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
pull/8536/head
Raju Udava 6 months ago committed by GitHub
parent
commit
933be8c3f5
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 4
      packages/nocodb/src/filters/global-exception/global-exception.filter.ts

4
packages/nocodb/src/filters/global-exception/global-exception.filter.ts

@ -10,6 +10,7 @@ import {
ExternalError,
extractDBError,
Forbidden,
NcBaseError,
NcBaseErrorv2,
NotFound,
SsoError,
@ -39,7 +40,8 @@ export class GlobalExceptionFilter implements ExceptionFilter {
exception = new NcBaseErrorv2(NcErrorType.BAD_JSON);
}
const dbError = extractDBError(exception);
// try to extract db error for unknown errors
const dbError = !(exception instanceof NcBaseError) ? extractDBError(exception) : null;
// skip unnecessary error logging
if (

Loading…
Cancel
Save