Unable to get UI to render error details.
{
"@error": "google.rpc.BadRequest is not recognized; see @value for raw binary message data",
"@type": "type.googleapis.com/google.rpc.BadRequest",
"@value": "CigKHW5hdGlvbmFsaXR5LmNvdW50cnlfb2Zfb3JpZ2luEgdpbnZhbGlk"
}
I guess it is because gRPC-UI doesn't know about type.googleapis.com/google.rpc.BadRequest and the server reflections don't provide them.
Is there any workarounds to get this to work?
You can work around this by supplying the sources directly using -proto arguments. If you still want to get the main service info from the server (via server reflection), and merely augment the reflection info with additional message types (such as for decoding extensions and google.protobuf.Any messages, including those in error details), you can also use the -use-reflection flag in combination with -proto flags.
Any suggestion on how to use server reflection with import of these external protos? Would appreciate if this was banked in, but understandably niche
I'm also experiencing this when interacting with a Python gRPC server with server reflection enabled.
What strikes me as strange is that grpcurl is able to find the types in the error details via server reflection and renders them properly.
Here is grpcurl:
❯ grpcurl -plaintext localhost:50050 org.company.users.v1alpha1.UserService.GetCurrentUser
ERROR:
Code: Unauthenticated
Message: Unauthenticated
Details:
1) {
"@type": "type.googleapis.com/org.company.errors.v1alpha1.ErrorInfo",
"reason": "MISSING_OR_INVALID_ACCESS_TOKEN"
}
Here is grpcui, launched with grpcui --plaintext localhost:50050, making the same request: