From dd8b3ac794f21f764f96b16112fd67fcac13d235 Mon Sep 17 00:00:00 2001 From: Alexander Malkov Date: Wed, 19 Jun 2024 10:21:40 +0300 Subject: [PATCH] fix grpc: fix some warnings and error message --- grpc/src/ugrpc/server/middlewares/base.cpp | 4 ++-- grpc/src/ugrpc/server/middlewares/log/middleware.cpp | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/grpc/src/ugrpc/server/middlewares/base.cpp b/grpc/src/ugrpc/server/middlewares/base.cpp index 8d3a03fa3fcb..9ae58e4b5e43 100644 --- a/grpc/src/ugrpc/server/middlewares/base.cpp +++ b/grpc/src/ugrpc/server/middlewares/base.cpp @@ -59,10 +59,10 @@ const dynamic_config::Snapshot& MiddlewareCallContext::GetInitialDynamicConfig() } void MiddlewareBase::CallRequestHook(const MiddlewareCallContext&, - google::protobuf::Message&){}; + google::protobuf::Message&){} void MiddlewareBase::CallResponseHook(const MiddlewareCallContext&, - google::protobuf::Message&){}; + google::protobuf::Message&){} } // namespace ugrpc::server diff --git a/grpc/src/ugrpc/server/middlewares/log/middleware.cpp b/grpc/src/ugrpc/server/middlewares/log/middleware.cpp index d938f3bd128e..fb08b804049e 100644 --- a/grpc/src/ugrpc/server/middlewares/log/middleware.cpp +++ b/grpc/src/ugrpc/server/middlewares/log/middleware.cpp @@ -22,12 +22,12 @@ std::string ProtobufAsJsonString(const google::protobuf::Message& message, google::protobuf::util::MessageToJsonString(message, &as_json, options); if (!status.ok()) { std::string log = - fmt::format("Error getting a json string: {}", status.message().data()); + fmt::format("Error getting a json string: {}", status.ToString()); LOG_WARNING() << log; return log; } return std::string{utils::log::ToLimitedUtf8(as_json, max_msg_size)}; -}; +} } // namespace