diff --git a/packages/nocodb/src/controllers/utils.controller.ts b/packages/nocodb/src/controllers/utils.controller.ts index cd9ca6ccd1..5530f9bd9e 100644 --- a/packages/nocodb/src/controllers/utils.controller.ts +++ b/packages/nocodb/src/controllers/utils.controller.ts @@ -71,7 +71,6 @@ export class UtilsController { }); } - @UseGuards(PublicApiLimiterGuard) @Get('/api/v1/health') async appHealth() { return await this.utilsService.appHealth(); diff --git a/packages/nocodb/src/filters/global-exception/global-exception.filter.ts b/packages/nocodb/src/filters/global-exception/global-exception.filter.ts index 1d2d2f940f..9c40d418ef 100644 --- a/packages/nocodb/src/filters/global-exception/global-exception.filter.ts +++ b/packages/nocodb/src/filters/global-exception/global-exception.filter.ts @@ -18,10 +18,10 @@ import { @Catch() export class GlobalExceptionFilter implements ExceptionFilter { constructor( - @Optional() @InjectSentry() private readonly sentryClient: SentryService, + @Optional() @InjectSentry() protected readonly sentryClient: SentryService, ) {} - private logger = new Logger(GlobalExceptionFilter.name); + protected logger = new Logger(GlobalExceptionFilter.name); catch(exception: any, host: ArgumentsHost) { const ctx = host.switchToHttp(); @@ -106,7 +106,7 @@ export class GlobalExceptionFilter implements ExceptionFilter { if (exception.getStatus?.()) { response.status(exception.getStatus()).json(exception.getResponse()); } else { - this.sentryClient?.instance().captureException(exception); + this.captureException(exception, request); // todo: change the response code response.status(400).json({ @@ -114,4 +114,8 @@ export class GlobalExceptionFilter implements ExceptionFilter { }); } } + + protected captureException(exception: any, _request: any) { + this.sentryClient?.instance().captureException(exception); + } }