Skip to content

Commit

Permalink
fix grpc: fix some warnings and error message
Browse files Browse the repository at this point in the history
  • Loading branch information
alexiprof committed Jun 19, 2024
1 parent ab8b129 commit dd8b3ac
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions grpc/src/ugrpc/server/middlewares/base.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
4 changes: 2 additions & 2 deletions grpc/src/ugrpc/server/middlewares/log/middleware.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down

0 comments on commit dd8b3ac

Please sign in to comment.