|
|
|
@ -39,8 +39,8 @@ void ParseJson(const std::string& json, const std::string& type, |
|
|
|
|
type_resolver.get(), "type.googleapis.com/" + type, json, &binary); |
|
|
|
|
if (!status.ok()) { |
|
|
|
|
std::string errmsg(status.message()); |
|
|
|
|
LOG(ERROR) << "Failed to convert json to binary: errcode=" |
|
|
|
|
<< static_cast<int>(status.code()) << " msg=" << errmsg; |
|
|
|
|
LOG(ERROR) << "Failed to convert json to binary: errcode=" << status.code() |
|
|
|
|
<< " msg=" << errmsg; |
|
|
|
|
grpc_core::Crash(absl::StrFormat("JSON: %s", json.c_str())); |
|
|
|
|
} |
|
|
|
|
CHECK(msg->ParseFromString(binary)); |
|
|
|
|