Skip to content

The open alternative to Salesforce, designed for AI.

Fix ExceptionHandler requiring httpAdapter (#3021)

Charles Bochet3659f12fba0f
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 c40346958a0..157e5094e2f 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 f3dbcc24848..62bfdb1fcda 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;
};
}