Skip to content

Privacy-first password manager with built-in email aliasing. Fully encrypted and self-hostable.

Update Login.razor (#52)

Leendert de Borstae652297fa54
diff --git a/src/AliasVault.WebApp/Auth/Pages/Login.razor b/src/AliasVault.WebApp/Auth/Pages/Login.razor
index 4957fa586..010c3f1a7 100644
--- a/src/AliasVault.WebApp/Auth/Pages/Login.razor
+++ b/src/AliasVault.WebApp/Auth/Pages/Login.razor
@@ -129,15 +129,19 @@
GlobalNotificationService.ClearMessages();
NavigationManager.NavigateTo("/");
}
+#if DEBUG
catch (Exception ex)
{
- // If in debug mode, throw the exception.
- #if DEBUG
+ // If in debug mode show the actual exception.
_serverValidationErrors.AddError(ex.ToString());
- #else
+ }
+#else
+ catch
+ {
+ // If in release mode show a generic error.
_serverValidationErrors.AddError("An error occurred while processing the login request. Try again (later).");
- #endif
}
+#endif
finally
{
_loadingIndicator.Hide();