Changeset - 6d52c33782d0
[Not reviewed]
0 1 0
Jan Kaluza - 10 years ago 2016-01-24 11:54:58
jkaluza@redhat.com
Show also URL in case of error
1 file changed with 3 insertions and 0 deletions:
0 comments (0 inline, 0 general)
spectrum/src/frontends/slack/SlackUserRegistration.cpp
Show inline comments
 
@@ -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 "";
 
	}
0 comments (0 inline, 0 general)