From d68733b7e58120298974b350e496bb3e0c9af0d2 Mon Sep 17 00:00:00 2001 From: Andreas Coroiu Date: Tue, 2 Jul 2024 12:00:48 +0200 Subject: [PATCH] feat: catch and log exceptions during migration --- libs/common/src/platform/services/migration-runner.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/libs/common/src/platform/services/migration-runner.ts b/libs/common/src/platform/services/migration-runner.ts index 9e3a6118af8..1190840b7ba 100644 --- a/libs/common/src/platform/services/migration-runner.ts +++ b/libs/common/src/platform/services/migration-runner.ts @@ -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 {