Show also URL in case of error
This commit is contained in:
parent
b882942383
commit
6d52c33782
1 changed files with 3 additions and 0 deletions
|
@ -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 "";
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue