Compare commits

...

7 Commits

Author SHA1 Message Date
guillim b38dd8a92d v44.17 : trhow eeror 2025-03-26 15:15:43 +01:00
guillim aafd9a8f3e testing new throw error 2025-03-26 15:14:21 +01:00
guillim ad769ba14e release 44.16 2025-03-26 10:28:56 +01:00
guillim 0b8e0acd51 adding logs 2025-03-26 10:27:14 +01:00
Guillim d8c85eaba4 fix MailboxConcurrency And email format without @ (#11133) 2025-03-25 11:46:08 +01:00
guillim 1832505f00 tagging the release v0.44.15 2025-03-25 11:44:05 +01:00
Charles Bochet 956f1fc268 Bump versions 2025-03-24 17:41:26 +01:00
13 changed files with 40 additions and 24 deletions
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "twenty-e2e-testing",
"version": "0.50.0-canary",
"version": "0.44.16",
"description": "",
"author": "",
"private": true,
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "twenty-emails",
"version": "0.50.0-canary",
"version": "0.44.17",
"description": "",
"author": "",
"private": true,
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "twenty-front",
"version": "0.50.0-canary",
"version": "0.44.17",
"private": true,
"type": "module",
"scripts": {
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "twenty-server",
"version": "0.50.0-canary",
"version": "0.44.17",
"description": "",
"author": "",
"private": true,
@@ -58,14 +58,13 @@ export class CalendarEventImportErrorHandlerService {
break;
case CalendarEventImportDriverExceptionCode.UNKNOWN:
case CalendarEventImportDriverExceptionCode.UNKNOWN_NETWORK_ERROR:
default:
await this.handleUnknownException(
exception,
calendarChannel,
workspaceId,
);
break;
default:
throw exception;
}
}
@@ -28,8 +28,11 @@ export class MicrosoftFetchByBatchService {
await this.microsoftClientProvider.getMicrosoftClient(connectedAccount);
for (let i = 0; i < messageIds.length; i += batchLimit) {
console.log('i', i);
const batchMessageIds = messageIds.slice(i, i + batchLimit);
console.log('batchMessageIds', batchMessageIds);
messageIdsByBatch.push(batchMessageIds);
const batchRequests = batchMessageIds.map((messageId, index) => ({
@@ -42,10 +45,14 @@ export class MicrosoftFetchByBatchService {
},
}));
console.log('batchRequests', batchRequests);
const batchResponse = await client
.api('/$batch')
.post({ requests: batchRequests });
console.log('batchResponse', batchResponse);
batchResponses.push(batchResponse);
}
@@ -104,6 +104,10 @@ export class MicrosoftGetMessagesService {
),
];
const safeParticipantsFormat = participants.filter((participant) => {
return participant.handle.includes('@');
});
return {
externalId: response.id,
subject: response.subject || '',
@@ -116,7 +120,7 @@ export class MicrosoftGetMessagesService {
response.from.emailAddress.address,
connectedAccount,
),
participants: participants,
participants: safeParticipantsFormat,
attachments: [],
};
});
@@ -1,7 +1,5 @@
import { Injectable } from '@nestjs/common';
import { GraphError } from '@microsoft/microsoft-graph-client';
import {
MessageImportDriverException,
MessageImportDriverExceptionCode,
@@ -9,7 +7,7 @@ import {
@Injectable()
export class MicrosoftHandleErrorService {
public handleMicrosoftMessageFetchError(error: GraphError): void {
public handleMicrosoftMessageFetchError(error: any): void {
if (!error.statusCode) {
throw new MessageImportDriverException(
`Microsoft Graph API unknown error: ${error}`,
@@ -32,7 +30,7 @@ export class MicrosoftHandleErrorService {
}
throw new MessageImportDriverException(
`Microsoft Graph API error: ${error.message}`,
`Microsoft driver error: ${error.message}`,
MessageImportDriverExceptionCode.UNKNOWN,
);
}
@@ -1,5 +1,6 @@
import { Injectable } from '@nestjs/common';
import { ExceptionHandlerService } from 'src/engine/core-modules/exception-handler/exception-handler.service';
import { TwentyORMManager } from 'src/engine/twenty-orm/twenty-orm.manager';
import { MessageChannelSyncStatusService } from 'src/modules/messaging/common/services/message-channel-sync-status.service';
import { MessageChannelWorkspaceEntity } from 'src/modules/messaging/common/standard-objects/message-channel.workspace-entity';
@@ -25,6 +26,7 @@ export class MessageImportExceptionHandlerService {
constructor(
private readonly twentyORMManager: TwentyORMManager,
private readonly messageChannelSyncStatusService: MessageChannelSyncStatusService,
private readonly exceptionHandlerService: ExceptionHandlerService,
) {}
public async handleDriverException(
@@ -57,14 +59,6 @@ export class MessageImportExceptionHandlerService {
workspaceId,
);
break;
case MessageImportDriverExceptionCode.UNKNOWN:
case MessageImportDriverExceptionCode.UNKNOWN_NETWORK_ERROR:
await this.handleUnknownException(
exception,
messageChannel,
workspaceId,
);
break;
case MessageImportDriverExceptionCode.SYNC_CURSOR_ERROR:
await this.handlePermanentException(
exception,
@@ -72,8 +66,15 @@ export class MessageImportExceptionHandlerService {
workspaceId,
);
break;
case MessageImportDriverExceptionCode.UNKNOWN:
case MessageImportDriverExceptionCode.UNKNOWN_NETWORK_ERROR:
default:
throw exception;
await this.handleUnknownException(
exception,
messageChannel,
workspaceId,
);
break;
}
}
@@ -153,6 +154,10 @@ export class MessageImportExceptionHandlerService {
workspaceId,
);
this.exceptionHandlerService.captureExceptions([
`Unknown error occurred while importing messages for message channel ${messageChannel.id} in workspace ${workspaceId}: ${exception.message}`,
]);
throw new MessageImportException(
`Unknown error occurred while importing messages for message channel ${messageChannel.id} in workspace ${workspaceId}: ${exception.message}`,
MessageImportExceptionCode.UNKNOWN,
@@ -122,7 +122,10 @@ export class MessagingMessagesImportService {
'[TMP] Debugging messages import for account:',
messageChannel.connectedAccount.id,
);
this.logger.log('[TMP] messageIdsToFetch:', messageIdsToFetch);
this.logger.log(
'[TMP] messageIdsToFetch:',
messageIdsToFetch.join(', '),
);
}
if (!messageIdsToFetch?.length) {
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "twenty-shared",
"version": "0.50.0-canary",
"version": "0.44.17",
"main": "dist/twenty-shared.cjs.js",
"module": "dist/twenty-shared.esm.js",
"license": "AGPL-3.0",
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "twenty-ui",
"version": "0.50.0-canary",
"version": "0.44.17",
"type": "module",
"main": "./src/index.ts",
"exports": {
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "twenty-website",
"version": "0.50.0-canary",
"version": "0.44.17",
"private": true,
"scripts": {
"nx": "NX_DEFAULT_PROJECT=twenty-website node ../../node_modules/nx/bin/nx.js",