From 4d604f735719999b0ef960c5d8d780b4b0752417 Mon Sep 17 00:00:00 2001 From: Bruno Windels Date: Fri, 18 Sep 2020 13:11:18 +0200 Subject: [PATCH] log all sync errors --- src/matrix/Sync.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/matrix/Sync.js b/src/matrix/Sync.js index 63be2ce2..fe2a2bed 100644 --- a/src/matrix/Sync.js +++ b/src/matrix/Sync.js @@ -105,6 +105,8 @@ export class Sync { this._status.set(SyncStatus.Syncing); } catch (err) { if (!(err instanceof AbortError)) { + console.warn("stopping sync because of error"); + console.error(err); this._error = err; this._status.set(SyncStatus.Stopped); } @@ -168,8 +170,6 @@ export class Sync { })); sessionChanges = await this._session.writeSync(response, syncFilterId, syncTxn); } catch(err) { - console.warn("aborting syncTxn because of error"); - console.error(err); // avoid corrupting state by only // storing the sync up till the point // the exception occurred