Changeset - b88294238340
[Not reviewed]
0 2 0
Jan Kaluza - 10 years ago 2016-01-24 11:48:40
jkaluza@redhat.com
SlackUserRegistration: show raw data when team domain cannot be found in the response
2 files changed with 5 insertions and 0 deletions:
0 comments (0 inline, 0 general)
include/transport/HTTPRequest.h
Show inline comments
 
@@ -32,6 +32,9 @@ class HTTPRequest : public Thread {
 
		bool execute();
 
		bool execute(rapidjson::Document &json);
 
		std::string getError() {return std::string(curl_errorbuffer);}
 
		const std::string &getRawData() {
 
			return m_data;
 
		}
 

	
 
		void run();
 
		void finalize();
spectrum/src/frontends/slack/SlackUserRegistration.cpp
Show inline comments
 
@@ -90,12 +90,14 @@ 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, req.getRawData());
 
		return "";
 
	}
 

	
 
	rapidjson::Value &domain = team["domain"];
 
	if (!domain.IsString()) {
 
		LOG4CXX_ERROR(logger, "No 'domain' string in the reply.");
 
		LOG4CXX_ERROR(logger, req.getRawData());
 
		return "";
 
	}
 

	
0 comments (0 inline, 0 general)