Aias00 commented on issue #10890:
URL: https://github.com/apache/rocketmq/issues/10890#issuecomment-5235425772

   Verified on `develop` at `e3458616d207ee636b1762f0f8dcf788a590d59d` (before 
the proposed fix).
   
   ### Steps to reproduce
   1. Create a gRPC telemetry context whose `language` metadata is an unknown 
value, for example `NOT_A_LANGUAGE`.
   2. Invoke `ClientActivity.heartbeat(...)` (the added 
`ClientActivityTest#testInvalidLanguageIsReportedAsInvalidArgument` does this 
deterministically).
   
   ### Expected behavior
   Invalid client metadata is rejected as a client-input error: 
`Code.BAD_REQUEST`, which the gRPC layer maps to `INVALID_ARGUMENT`.
   
   ### Actual behavior
   `LanguageCode.valueOf(ctx.getLanguage())` throws `IllegalArgumentException`. 
It is not translated to `GrpcProxyException`, so the gRPC layer returns 
`INTERNAL`.
   
   ### Evidence
   The regression test failed against the commit above with: 
`expected:<INVALID_ARGUMENT> but was:<INTERNAL>`. PR #10891 adds the reproducer 
and translates blank/unsupported language metadata to `Code.BAD_REQUEST`.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to