Improve error message for invalid login details using yggdrasil, add debug log for unknown codes

This commit is contained in:
Sky 2013-10-15 03:11:10 +01:00
parent 7aacf93c7c
commit 0a715a7b78

View File

@ -201,7 +201,13 @@ void LoginTask::processYggdrasilReply(QNetworkReply *reply)
emitFailed(tr("Login canceled.")); emitFailed(tr("Login canceled."));
break; break;
// Equivalent to an HTTP 403
case QNetworkReply::ContentOperationNotPermittedError:
emitFailed(tr("Invalid username or password."));
break;
default: default:
QLOG_DEBUG() << "Login failed with QNetworkReply code:" << reply->error();
emitFailed(tr("Login failed: %1").arg(reply->errorString())); emitFailed(tr("Login failed: %1").arg(reply->errorString()));
break; break;
} }