From dd937523b16cbb0f91b59a4ac23584412e97c141 Mon Sep 17 00:00:00 2001 From: Leendert de Borst Date: Sat, 25 Apr 2026 00:02:04 +0200 Subject: [PATCH] Update DbService.cs error reporting (#1786) --- .../AliasVault.Client/Services/Database/DbService.cs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/apps/server/AliasVault.Client/Services/Database/DbService.cs b/apps/server/AliasVault.Client/Services/Database/DbService.cs index 916b2ad66..036dfd121 100644 --- a/apps/server/AliasVault.Client/Services/Database/DbService.cs +++ b/apps/server/AliasVault.Client/Services/Database/DbService.cs @@ -279,7 +279,7 @@ public sealed class DbService : IDisposable catch (Exception ex) { _logger.LogError(ex, "Error during background database sync."); - _globalNotificationService.AddErrorMessage(_sharedLocalizer["ErrorUnknown"]); + _globalNotificationService.AddErrorMessage(_sharedLocalizer["ErrorUnknown"], true); _state.UpdateState(DbServiceState.DatabaseStatus.Ready); } }, @@ -720,7 +720,7 @@ public sealed class DbService : IDisposable if (response?.Vault == null || string.IsNullOrEmpty(response.Vault.Blob)) { _logger.LogError("Failed to fetch vault from server for merge."); - _globalNotificationService.AddErrorMessage(_sharedLocalizer["ErrorUnknown"]); + _globalNotificationService.AddErrorMessage(_sharedLocalizer["ErrorUnknown"], true); return false; } @@ -778,7 +778,7 @@ public sealed class DbService : IDisposable if (await reader.ReadAsync()) { _logger.LogError("Foreign key violation detected after merge."); - _globalNotificationService.AddErrorMessage(_sharedLocalizer["ErrorUnknown"]); + _globalNotificationService.AddErrorMessage(_sharedLocalizer["ErrorUnknown"], true); return false; } } @@ -798,7 +798,7 @@ public sealed class DbService : IDisposable } catch (Exception ex) { - _globalNotificationService.AddErrorMessage(_sharedLocalizer["ErrorUnknown"]); + _globalNotificationService.AddErrorMessage(_sharedLocalizer["ErrorUnknown"], true); _logger.LogError(ex, "Error merging with server vault."); return false; }