Handle error 429 during partial sync (#4258)

handle error 429
This commit is contained in:
bosiraphael
2024-03-01 14:41:42 +01:00
committed by GitHub
parent b69fed9023
commit 4242b546b6

View File

@ -105,6 +105,14 @@ export class GmailPartialSyncService {
return;
}
if (error && error.code === 429) {
this.logger.log(
`gmail partial-sync for workspace ${workspaceId} and account ${connectedAccountId}: Error 429: ${error.message}, partial sync will be retried later.`,
);
return;
}
if (error) {
throw new Error(
`Error getting history for ${connectedAccountId} in workspace ${workspaceId} during partial-sync: