File tree 1 file changed +16
-2
lines changed
packages/twenty-server/src/modules/messaging/common/services
1 file changed +16
-2
lines changed Original file line number Diff line number Diff line change @@ -18,7 +18,7 @@ type SyncStep =
18
18
| 'messages-import' ;
19
19
20
20
export type GmailError = {
21
- code : number ;
21
+ code : number | string ;
22
22
reason : string ;
23
23
} ;
24
24
@@ -94,7 +94,21 @@ export class MessagingErrorHandlingService {
94
94
workspaceId ,
95
95
) ;
96
96
break ;
97
-
97
+ case 'ECONNRESET' :
98
+ case 'ENOTFOUND' :
99
+ case 'ECONNABORTED' :
100
+ case 'ETIMEDOUT' :
101
+ case 'ERR_NETWORK' :
102
+ // We are currently mixing up Gmail Error code (HTTP status) and axios error code (ECONNRESET)
103
+
104
+ // In case of a network error, we should retry the request
105
+ await this . handleRateLimitExceeded (
106
+ error ,
107
+ syncStep ,
108
+ messageChannel ,
109
+ workspaceId ,
110
+ ) ;
111
+ break ;
98
112
default :
99
113
await this . messagingChannelSyncStatusService . markAsFailedUnknownAndFlushMessagesToImport (
100
114
messageChannel . id ,
You can’t perform that action at this time.
0 commit comments