Improve sentry filtering and grouping (#12071)
Follow-up on https://github.com/twentyhq/twenty/pull/12007 In this PR - adding a filter on HttpExceptionHandlerService to filter out 4xx errors from driver handling (as we do for graphQL errors: see useGraphQLErrorHandler hook - only filteredIssues are sent to` exceptionHandlerService.captureExceptions()`.) - grouping together more missing metadata issues - attempting to use error codes as issues names in sentry to improve UI; for now it says "Error" all the time
This commit is contained in:
@ -2,7 +2,7 @@ import { NestFactory } from '@nestjs/core';
|
||||
|
||||
import { ExceptionHandlerService } from 'src/engine/core-modules/exception-handler/exception-handler.service';
|
||||
import { LoggerService } from 'src/engine/core-modules/logger/logger.service';
|
||||
import { shouldFilterException } from 'src/engine/utils/global-exception-handler.util';
|
||||
import { shouldCaptureException } from 'src/engine/utils/global-exception-handler.util';
|
||||
import 'src/instrument';
|
||||
import { QueueWorkerModule } from 'src/queue-worker/queue-worker.module';
|
||||
|
||||
@ -23,7 +23,7 @@ async function bootstrap() {
|
||||
} catch (err) {
|
||||
loggerService?.error(err?.message, err?.name);
|
||||
|
||||
if (!shouldFilterException(err)) {
|
||||
if (shouldCaptureException(err)) {
|
||||
exceptionHandlerService?.captureExceptions([err]);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user