feat: catch and log exceptions during migration

This commit is contained in:
Andreas Coroiu 2024-07-02 12:00:48 +02:00
parent da7e466252
commit d68733b7e5
No known key found for this signature in database
GPG Key ID: E70B5FFC81DFEC1A
1 changed files with 5 additions and 1 deletions

View File

@ -32,7 +32,11 @@ export class MigrationRunner {
const migrationBuilder = this.migrationBuilderService.build();
await migrationBuilder.migrate(migrationHelper);
try {
await migrationBuilder.migrate(migrationHelper);
} catch (error) {
this.logService.error("Critical migration failure due to an exception: ", error);
}
}
async waitForCompletion(): Promise<void> {