Skip to content

Commit

Permalink
runfix: Improve Backup canceling error logging (#15032)
Browse files Browse the repository at this point in the history
  • Loading branch information
atomrc authored Apr 17, 2023
1 parent c5d7f82 commit 8b9ed49
Showing 1 changed file with 6 additions and 11 deletions.
17 changes: 6 additions & 11 deletions src/script/backup/BackupRepository.ts
Original file line number Diff line number Diff line change
Expand Up @@ -213,17 +213,12 @@ export class BackupRepository {
throw new InvalidMetaDataError();
}

try {
await this.verifyMetadata(user, files);
const fileDescriptors = Object.entries(files).map(([filename, content]) => ({
content,
filename,
}));
await this.importHistoryData(fileDescriptors, initCallback, progressCallback);
} catch (error) {
this.logger.error(`Could not import history: ${error.message}`, error);
throw error;
}
await this.verifyMetadata(user, files);
const fileDescriptors = Object.entries(files).map(([filename, content]) => ({
content,
filename,
}));
await this.importHistoryData(fileDescriptors, initCallback, progressCallback);
}

private async importHistoryData(
Expand Down

0 comments on commit 8b9ed49

Please sign in to comment.