From 9abcf7e8d8dfee617e85c896d57da78b72147802 Mon Sep 17 00:00:00 2001 From: Juan Tejada Date: Mon, 30 Jan 2017 21:58:53 -0800 Subject: [PATCH] [local-sync] Report permanent sync errors to sentry --- .../sync-tasks/fetch-messages-in-folder.imap.es6 | 2 +- packages/local-sync/src/local-sync-worker/sync-worker.es6 | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/local-sync/src/local-sync-worker/sync-tasks/fetch-messages-in-folder.imap.es6 b/packages/local-sync/src/local-sync-worker/sync-tasks/fetch-messages-in-folder.imap.es6 index 2f898e855..4ef31b27c 100644 --- a/packages/local-sync/src/local-sync-worker/sync-tasks/fetch-messages-in-folder.imap.es6 +++ b/packages/local-sync/src/local-sync-worker/sync-tasks/fetch-messages-in-folder.imap.es6 @@ -610,7 +610,7 @@ class FetchMessagesInFolderIMAP extends SyncTask { _shouldFetchAttributes(boxStatus) { if (boxStatus.name !== this._folder.name) { - throw new Error(`FetchMessagesInFolder::_shouldFetchMessages - boxStatus doesn't correspond to folder`) + throw new Error(`FetchMessagesInFolder::_shouldFetchAttributes - boxStatus doesn't correspond to folder`) } if (!this._folder.isSyncComplete()) { return true 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 34e66b89b..06aa3de21 100644 --- a/packages/local-sync/src/local-sync-worker/sync-worker.es6 +++ b/packages/local-sync/src/local-sync-worker/sync-worker.es6 @@ -291,6 +291,7 @@ class SyncWorker { return } + NylasEnv.reportError(error) const isAuthError = error instanceof IMAPErrors.IMAPAuthenticationError const accountSyncState = isAuthError ? SYNC_STATE_AUTH_FAILED : SYNC_STATE_ERROR; // TODO this is currently a hack to keep N1's account in sync and notify of