From 50bad5539b571441c86aac0b828b825fa3fdb70b Mon Sep 17 00:00:00 2001 From: Alex Jbanca Date: Wed, 6 Dec 2023 12:22:11 +0200 Subject: [PATCH] fix: Show wrong password error on V4 migration as well Check if the sqlite error "file is not a database" is included the error message and ignore the custom app error substrings. --- ui/app/AppLayouts/Onboarding/views/LoginView.qml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ui/app/AppLayouts/Onboarding/views/LoginView.qml b/ui/app/AppLayouts/Onboarding/views/LoginView.qml index b71713e59f..c2bc9ce92d 100644 --- a/ui/app/AppLayouts/Onboarding/views/LoginView.qml +++ b/ui/app/AppLayouts/Onboarding/views/LoginView.qml @@ -138,7 +138,7 @@ Item { if (error) { if (!root.startupStore.selectedLoginAccount.keycardCreatedAccount) { // SQLITE_NOTADB: "file is not a database" - if (error === "file is not a database" || error.startsWith("failed to set ")) { + if (error.includes("file is not a database")) { txtPassword.validationError = qsTr("Password incorrect") } else { txtPassword.validationError = qsTr("Login failed: %1").arg(error.toUpperCase())