Skip to content

The open alternative to Salesforce, designed for AI.

add case for calendar revoked refresh token (#15837)

neo77346149cdb149f
diff --git a/packages/twenty-server/src/modules/calendar/calendar-event-import-manager/services/calendar-account-authentication.service.ts b/packages/twenty-server/src/modules/calendar/calendar-event-import-manager/services/calendar-account-authentication.service.ts
index b0790dc7009..2526d779b9e 100644
--- a/packages/twenty-server/src/modules/calendar/calendar-event-import-manager/services/calendar-account-authentication.service.ts
+++ b/packages/twenty-server/src/modules/calendar/calendar-event-import-manager/services/calendar-account-authentication.service.ts
@@ -86,6 +86,7 @@ export class CalendarAccountAuthenticationService {
);
case ConnectedAccountRefreshAccessTokenExceptionCode.REFRESH_ACCESS_TOKEN_FAILED:
case ConnectedAccountRefreshAccessTokenExceptionCode.REFRESH_TOKEN_NOT_FOUND:
+ case ConnectedAccountRefreshAccessTokenExceptionCode.INVALID_REFRESH_TOKEN:
throw new CalendarEventImportDriverException(
error.message,
CalendarEventImportDriverExceptionCode.INSUFFICIENT_PERMISSIONS,