[local-sync] Report permanent sync errors to sentry

This commit is contained in:
Juan Tejada 2017-01-30 21:58:53 -08:00
parent e2d201c4b7
commit 9abcf7e8d8
2 changed files with 2 additions and 1 deletions

View file

@ -610,7 +610,7 @@ class FetchMessagesInFolderIMAP extends SyncTask {
_shouldFetchAttributes(boxStatus) { _shouldFetchAttributes(boxStatus) {
if (boxStatus.name !== this._folder.name) { 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()) { if (!this._folder.isSyncComplete()) {
return true return true

View file

@ -291,6 +291,7 @@ class SyncWorker {
return return
} }
NylasEnv.reportError(error)
const isAuthError = error instanceof IMAPErrors.IMAPAuthenticationError const isAuthError = error instanceof IMAPErrors.IMAPAuthenticationError
const accountSyncState = isAuthError ? SYNC_STATE_AUTH_FAILED : SYNC_STATE_ERROR; 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 // TODO this is currently a hack to keep N1's account in sync and notify of