log all sync errors
This commit is contained in:
parent
3704de1a26
commit
4d604f7357
1 changed files with 2 additions and 2 deletions
|
@ -105,6 +105,8 @@ export class Sync {
|
||||||
this._status.set(SyncStatus.Syncing);
|
this._status.set(SyncStatus.Syncing);
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
if (!(err instanceof AbortError)) {
|
if (!(err instanceof AbortError)) {
|
||||||
|
console.warn("stopping sync because of error");
|
||||||
|
console.error(err);
|
||||||
this._error = err;
|
this._error = err;
|
||||||
this._status.set(SyncStatus.Stopped);
|
this._status.set(SyncStatus.Stopped);
|
||||||
}
|
}
|
||||||
|
@ -168,8 +170,6 @@ export class Sync {
|
||||||
}));
|
}));
|
||||||
sessionChanges = await this._session.writeSync(response, syncFilterId, syncTxn);
|
sessionChanges = await this._session.writeSync(response, syncFilterId, syncTxn);
|
||||||
} catch(err) {
|
} catch(err) {
|
||||||
console.warn("aborting syncTxn because of error");
|
|
||||||
console.error(err);
|
|
||||||
// avoid corrupting state by only
|
// avoid corrupting state by only
|
||||||
// storing the sync up till the point
|
// storing the sync up till the point
|
||||||
// the exception occurred
|
// the exception occurred
|
||||||
|
|
Reference in a new issue