SlackUserRegistration: show raw data when team domain cannot be found in the response
This commit is contained in:
parent
8efab17c15
commit
b882942383
2 changed files with 5 additions and 0 deletions
|
@ -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();
|
||||
|
|
|
@ -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 "";
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue