catch any stupid or lazy mistakes that could be made...

This commit is contained in:
DarthArgus
2016-04-17 02:13:05 +00:00
parent 61298b7468
commit 81b05726ce
@@ -244,7 +244,14 @@ void ClientConnection::validateClient(const std::string & id, const std::string
}
else
{
ErrorMessage err("Login Failed", j["userMessage"]);
std::string errMsg = j["userMessage"];
if (errMsg.empty()) //prevent stupid mistakes
{
errMsg = "Error: authentication service provided no user message.";
}
ErrorMessage err("Login Failed", errMsg);
this->send(err, true);
}