} else {
command = "{\"prefix\":\"" + raw_command + "\"}";
}
- client.do_request(command, &output);
+ std::string err = client.do_request(command, &output);
+ if (!err.empty()) {
+ std::cerr << __func__ << " AdminSocketClient::do_request errored with: "
+ << err << std::endl;
+ ceph_assert(false);
+ }
return std::make_pair(command, output);
}
std::cout << std::endl
<< "Sending request to " << socket << std::endl
<< std::endl;
- client.do_request("{\"prefix\":\"help\"}", &response);
+ std::string err = client.do_request("{\"prefix\":\"help\"}", &response);
+ if (!err.empty()) {
+ std::cerr << __func__ << " AdminSocketClient::do_request errored with: "
+ << err << std::endl;
+ return false;
+ }
std::cout << response << '\n';
JSONParser parser;