Skip to content

Commit

Permalink
fix: filter non-generic errors from logs for NcBaseErrorv2
Browse files Browse the repository at this point in the history
  • Loading branch information
mertmit committed Mar 28, 2024
1 parent 4bcd238 commit 7443e77
Showing 1 changed file with 8 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import { Catch, Logger, NotFoundException, Optional } from '@nestjs/common';
import { InjectSentry, SentryService } from '@ntegral/nestjs-sentry';
import { ThrottlerException } from '@nestjs/throttler';
import { NcErrorType } from 'nocodb-sdk';
import type { ArgumentsHost, ExceptionFilter } from '@nestjs/common';
import type { Request, Response } from 'express';
import {
Expand Down Expand Up @@ -38,7 +39,13 @@ export class GlobalExceptionFilter implements ExceptionFilter {
exception instanceof NotFound ||
exception instanceof UnprocessableEntity ||
exception instanceof NotFoundException ||
exception instanceof ThrottlerException
exception instanceof ThrottlerException ||
(exception instanceof NcBaseErrorv2 &&
![
NcErrorType.INTERNAL_SERVER_ERROR,
NcErrorType.DATABASE_ERROR,
NcErrorType.UNKNOWN_ERROR,
].includes(exception.error))
)
)
this.logError(exception, request);
Expand Down

1 comment on commit 7443e77

@github-actions
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The PR changes have been deployed. Please run the following command to verify:

docker run -d -p 8888:8080 nocodb/nocodb-timely:0.204.9-pr-7991-20240328-0750

Please sign in to comment.