Show also URL in case of error

This commit is contained in:
Jan Kaluza 2016-01-24 11:54:58 +01:00
parent b882942383
commit 6d52c33782

View file

@ -83,6 +83,7 @@ std::string SlackUserRegistration::getTeamDomain(const std::string &token) {
rapidjson::Document resp;
HTTPRequest req(HTTPRequest::Get, url);
if (!req.execute(resp)) {
LOG4CXX_ERROR(logger, url);
LOG4CXX_ERROR(logger, req.getError());
return "";
}
@ -90,6 +91,7 @@ std::string SlackUserRegistration::getTeamDomain(const std::string &token) {
rapidjson::Value &team = resp["team"];
if (!team.IsObject()) {
LOG4CXX_ERROR(logger, "No 'team' object in the reply.");
LOG4CXX_ERROR(logger, url);
LOG4CXX_ERROR(logger, req.getRawData());
return "";
}
@ -97,6 +99,7 @@ std::string SlackUserRegistration::getTeamDomain(const std::string &token) {
rapidjson::Value &domain = team["domain"];
if (!domain.IsString()) {
LOG4CXX_ERROR(logger, "No 'domain' string in the reply.");
LOG4CXX_ERROR(logger, url);
LOG4CXX_ERROR(logger, req.getRawData());
return "";
}