From 0a12608971c37dd5daffcb8103c36052bf284ea6 Mon Sep 17 00:00:00 2001 From: Juan Tejada Date: Fri, 20 Jan 2017 08:36:12 -0800 Subject: [PATCH] [local-sync] Never show red box on retryable errors Summary: Given that we were marking the account as errored if we've encountered enough RetryableErrors, we would show the red box to the user when in fact the problem was the user was offline, causing confusion If the user is offline, we will constantly get RetryableErrors in the sync loop, and we can't mark the account as errored in that case. Test Plan: manual Reviewers: evan Reviewed By: evan Differential Revision: https://phab.nylas.com/D3752 --- packages/local-sync/src/local-sync-worker/sync-worker.es6 | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/packages/local-sync/src/local-sync-worker/sync-worker.es6 b/packages/local-sync/src/local-sync-worker/sync-worker.es6 index e436eb27c..e749fce99 100644 --- a/packages/local-sync/src/local-sync-worker/sync-worker.es6 +++ b/packages/local-sync/src/local-sync-worker/sync-worker.es6 @@ -273,13 +273,9 @@ class SyncWorker { // Don't save the error to the account if it was a network/retryable error // /and/ if we haven't retried too many times. - // If we've retried enough times and still can't get it to work, - // we do want to save the error to show it the user that there is an error if (error instanceof IMAPErrors.RetryableError) { this._numRetries += 1; - if (this._numRetries <= 3) { - return - } + return } const isAuthError = error instanceof IMAPErrors.IMAPAuthenticationError