adding new error codes to the temporary catch (#12366)

For microsoft, examples of errors from the logs:

<img width="1251" alt="Screenshot 2025-05-28 at 18 02 48"
src="https://github.com/user-attachments/assets/7de506b2-3e68-4ee5-907a-62fe6a0e2ba5"
/>


Fixes https://github.com/twentyhq/twenty/issues/12252
This commit is contained in:
Guillim
2025-06-02 15:15:49 +02:00
committed by GitHub
parent f48145c01b
commit b80a270e9d
3 changed files with 25 additions and 2 deletions
@@ -40,7 +40,11 @@ export const parseMicrosoftMessagesImportError = (error: {
}
}
if (error.statusCode === 429 || error.statusCode === 503) {
if (
error.statusCode === 429 ||
error.statusCode === 503 ||
error.statusCode === 509
) {
return new MessageImportDriverException(
`Microsoft Graph API ${error.code} ${error.statusCode} error: ${error.message}`,
MessageImportDriverExceptionCode.TEMPORARY_ERROR,