From c2f3324302716d9769d4db181f5609af20a53f3b Mon Sep 17 00:00:00 2001 From: David Baker Date: Fri, 3 Aug 2018 16:59:10 +0100 Subject: [PATCH] Send sync error to listener We do this in other places, but not here --- src/sync.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/sync.js b/src/sync.js index 2636460b9..6d56a4fdc 100644 --- a/src/sync.js +++ b/src/sync.js @@ -763,7 +763,7 @@ SyncApi.prototype._onSyncError = function(err, syncOptions) { // fails, since long lived HTTP connections will // go away sometimes and we shouldn't treat this as // erroneous. We set the state to 'reconnecting' - // instead, so that clients can onserve this state + // instead, so that clients can observe this state // if they wish. this._startKeepAlives().then(() => { this._sync(syncOptions); @@ -774,6 +774,7 @@ SyncApi.prototype._onSyncError = function(err, syncOptions) { this._updateSyncState( this._failedSyncCount >= FAILED_SYNC_ERROR_THRESHOLD ? "ERROR" : "RECONNECTING", + { error: err }, ); };