[local-sync] More retryable IMAP errors

Summary:
I've encountered random imap errors that we mark as permanent, but that
contain try again in the error message. We should check for that

Test Plan: manual

Reviewers: spang, evan, mark

Differential Revision: https://phab.nylas.com/D3899
This commit is contained in:
Juan Tejada 2017-02-11 12:55:32 -08:00
parent 2d3bb52bc8
commit 3a2f2ec6fc

View file

@ -77,6 +77,11 @@ class IMAPCertificateError extends NylasError { }
function convertImapError(imapError) {
let error;
if (imapError.message.toLowerCase().includes('try again')) {
error = new RetryableError(imapError)
error.source = imapError.source
return error
}
if (imapError.message.includes('System Error')) {
// System Errors encountered in the wild so far have been retryable.
error = new RetryableError(imapError)