Commit 9aeb9d3e authored by Shashwat Jolly's avatar Shashwat Jolly
Browse files

Fix error message for non-etebase servers and non-existing accounts

- Show API error message for Unauthorized error
- Show "server not found" error for NotFound error
parent 1e5c4473
......@@ -119,14 +119,12 @@ bool LoginPage::validatePage()
if (!mLoginResult) {
qCDebug(ETESYNC_LOG) << "loginResult error" << mErrorCode;
if (mErrorCode == EtebaseErrorCode::ETEBASE_ERROR_CODE_UNAUTHORIZED) {
mLoginLabel->setText(i18n("Incorrect login credentials. Please try again."));
} else if (mErrorCode == EtebaseErrorCode::ETEBASE_ERROR_CODE_URL_PARSE) {
if (mErrorCode == EtebaseErrorCode::ETEBASE_ERROR_CODE_URL_PARSE) {
mLoginLabel->setText(i18n("Please ensure that the server URL is correct. The URL should start with http:// or https://."));
} else if (mErrorCode == EtebaseErrorCode::ETEBASE_ERROR_CODE_CONNECTION) {
mLoginLabel->setText(i18n("Could not connect to the server. Please ensure that the server URL is correct."));
} else if (mErrorCode == EtebaseErrorCode::ETEBASE_ERROR_CODE_NOT_FOUND) {
mLoginLabel->setText(i18n("Account does not exist. Please sign up for the service first."));
mLoginLabel->setText(i18n("EteSync server not found. Please ensure that the server URL is correct."));
} else {
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment