From 3659f12fba0fd91a842f3810b80e36f4a59dbf73 Mon Sep 17 00:00:00 2001 From: Charles Bochet Date: Fri, 15 Dec 2023 16:07:35 +0100 Subject: [PATCH] Fix ExceptionHandler requiring httpAdapter (#3021) --- .../exception-handler/exception-handler.module-factory.ts | 2 +- .../exception-handler/interfaces/exception-handler.interface.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/twenty-server/src/integrations/exception-handler/exception-handler.module-factory.ts b/packages/twenty-server/src/integrations/exception-handler/exception-handler.module-factory.ts index c40346958a..157e5094e2 100644 --- a/packages/twenty-server/src/integrations/exception-handler/exception-handler.module-factory.ts +++ b/packages/twenty-server/src/integrations/exception-handler/exception-handler.module-factory.ts @@ -26,7 +26,7 @@ export const exceptionHandlerModuleFactory = async ( type: ExceptionHandlerDriver.Sentry, options: { dns: environmentService.getSentryDSN() ?? '', - serverInstance: adapterHost.httpAdapter.getInstance(), + serverInstance: adapterHost.httpAdapter?.getInstance(), debug: environmentService.isDebugMode(), }, }; diff --git a/packages/twenty-server/src/integrations/exception-handler/interfaces/exception-handler.interface.ts b/packages/twenty-server/src/integrations/exception-handler/interfaces/exception-handler.interface.ts index f3dbcc2484..62bfdb1fcd 100644 --- a/packages/twenty-server/src/integrations/exception-handler/interfaces/exception-handler.interface.ts +++ b/packages/twenty-server/src/integrations/exception-handler/interfaces/exception-handler.interface.ts @@ -9,7 +9,7 @@ export interface ExceptionHandlerSentryDriverFactoryOptions { type: ExceptionHandlerDriver.Sentry; options: { dns: string; - serverInstance: Router; + serverInstance?: Router; debug?: boolean; }; }