add logging for #162124 (#162202)

This commit is contained in:
Sandeep Somavarapu 2022-09-28 17:30:54 +02:00 committed by GitHub
parent 7fc4f97bbb
commit 8697f84651
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 7 additions and 9 deletions

View file

@ -204,8 +204,8 @@ export class UserDataAutoSyncService extends Disposable implements IUserDataAuto
await this.userDataSyncService.resetLocal();
}
} catch (error) {
this.logService.error(error);
if (softTurnOffOnError) {
this.logService.error(error);
this.updateEnablement(false);
} else {
throw error;

View file

@ -391,16 +391,14 @@ export class UserDataSyncService extends Disposable implements IUserDataSyncServ
async resetLocal(): Promise<void> {
this.checkEnablement();
this.storageService.remove(LAST_SYNC_TIME_KEY, StorageScope.APPLICATION);
if (this.activeProfileSynchronizers) {
for (const [synchronizer] of this.activeProfileSynchronizers.values()) {
try {
await synchronizer.resetLocal();
} catch (e) {
this.logService.error(e);
}
for (const [synchronizer] of this.activeProfileSynchronizers.values()) {
try {
await synchronizer.resetLocal();
} catch (e) {
this.logService.error(e);
}
this.clearActiveProfileSynchronizers();
}
this.clearActiveProfileSynchronizers();
this._onDidResetLocal.fire();
this.logService.info('Did reset the local sync state.');
}