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 c40346958..157e5094e 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 f3dbcc248..62bfdb1fc 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; }; }