Summary
When interacting with gRPC servers that return rich error details via the grpc-status-details-bin header, the client should be able to parse these details. This header contains base64-encoded protobuf google.rpc.Status messages with typed Any details.
Current Behavior
The client only parses Connect protocol JSON error bodies. When a server returns grpc-status-details-bin, these details are ignored.
Reference Implementation
In connect-go, this is handled in connect-go/error.go and connect-go/protocol_grpc.go:
- Parses the base64-encoded header
- Decodes the
google.rpc.Status protobuf
- Extracts typed
Any details into the error structure
Proposed Changes
- Add
grpc-status-details-bin header parsing in error handling
- Decode base64 content to
google.rpc.Status protobuf
- Expose parsed details in
ClientError or Status type
- This enables interoperability with gRPC servers even when using Connect protocol
Note
This is specifically for parsing error details when a server includes them, not for full gRPC protocol support (which is handled by tonic).
References
Summary
When interacting with gRPC servers that return rich error details via the
grpc-status-details-binheader, the client should be able to parse these details. This header contains base64-encoded protobufgoogle.rpc.Statusmessages with typedAnydetails.Current Behavior
The client only parses Connect protocol JSON error bodies. When a server returns
grpc-status-details-bin, these details are ignored.Reference Implementation
In
connect-go, this is handled inconnect-go/error.goandconnect-go/protocol_grpc.go:google.rpc.StatusprotobufAnydetails into the error structureProposed Changes
grpc-status-details-binheader parsing in error handlinggoogle.rpc.StatusprotobufClientErrororStatustypeNote
This is specifically for parsing error details when a server includes them, not for full gRPC protocol support (which is handled by tonic).
References