Skip to content

Commit 5dcc110

Browse files
committed
fix grpc: do not log invalid custom metadata value
commit_hash:e7188183f9ccf8da6225d25d8c8f8e6cadba53a0
1 parent 0a2cabc commit 5dcc110

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

grpc/src/ugrpc/client/call_options.cpp

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,10 @@ bool IsValidMetadataAsciiValue(std::string_view meta_key) {
4949
void CheckCustomMetadata(std::string_view meta_key, std::string_view meta_value) {
5050
UINVARIANT(IsValidMetadataHeaderName(meta_key), fmt::format("Invalid Custom Metadata Key: {}", meta_key));
5151
if (!utils::text::EndsWith(meta_key, "-bin")) {
52-
UINVARIANT(IsValidMetadataAsciiValue(meta_value), fmt::format("Invalid Custom Metadata Value: {}", meta_value));
52+
UINVARIANT(
53+
IsValidMetadataAsciiValue(meta_value),
54+
fmt::format("Invalid Custom Metadata Value, Key: {}", meta_key)
55+
);
5356
}
5457
}
5558

0 commit comments

Comments
 (0)