Skip to content

[client] Support parsing grpc-status-details-bin for rich error details #32

Description

@washanhanzi

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

  1. Add grpc-status-details-bin header parsing in error handling
  2. Decode base64 content to google.rpc.Status protobuf
  3. Expose parsed details in ClientError or Status type
  4. 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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions