From 79ff0cd645d14d7a1ce2da756e6f5debd5a121af Mon Sep 17 00:00:00 2001 From: jakub-racek-swi Date: Tue, 17 Sep 2024 13:53:19 +0000 Subject: [PATCH] Set correct MessageToString return value Signed-off-by: jakub-racek-swi --- otlp/otlp_util.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/otlp/otlp_util.h b/otlp/otlp_util.h index 4c61d982..782ad913 100644 --- a/otlp/otlp_util.h +++ b/otlp/otlp_util.h @@ -13,7 +13,7 @@ template std::string get_request_json(const T &request) google::protobuf::util::JsonPrintOptions json_print_options; json_print_options.add_whitespace = true; json_print_options.always_print_primitive_fields = true; - google::protobuf::util::Status status = google::protobuf::util::MessageToJsonString(request, &request_json_str, json_print_options); + auto status = google::protobuf::util::MessageToJsonString(request, &request_json_str, json_print_options); if (!status.ok()) { std::cerr << "Failed to convert message to JSON: " << status.ToString() << std::endl; return "";