Only log sync errors if they are permanent errors

This commit is contained in:
Juan Tejada 2016-07-14 13:44:43 -07:00
parent 37b2323cc7
commit 099e200ec5

View file

@ -197,14 +197,13 @@ class SyncWorker {
}
onSyncError(error) {
this._logger.error(error, `SyncWorker: Error while syncing account`)
this.closeConnection()
// Continue to retry if it was a network error
if (error instanceof Errors.RetryableError) {
return Promise.resolve()
}
this._logger.error(error, `SyncWorker: Error while syncing account`)
global.Metrics.reportMetric({
name: 'sync_error',
value: 1,