grpc: add a warning for unsupported codec (#6658)

This commit is contained in:
Easwar Swaminathan 2023-10-12 18:22:24 -07:00 committed by GitHub
parent 3e9b85c6a9
commit 2cf5619c4d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 0 deletions

View File

@ -1913,6 +1913,7 @@ func (s *Server) getCodec(contentSubtype string) baseCodec {
}
codec := encoding.GetCodec(contentSubtype)
if codec == nil {
logger.Warningf("Unsupported codec %q. Defaulting to %q for now. This will start to fail in future releases.", contentSubtype, proto.Name)
return encoding.GetCodec(proto.Name)
}
return codec