grpc
protocol_error
ai_generated
true
未知错误:gRPC:响应尾部缺少状态详细信息
UNKNOWN: grpc: Status details missing in response trailer
ID: grpc/status-details-missing
85%修复率
80%置信度
1证据数
2025-02-18首次发现
版本兼容性
| 版本 | 状态 | 引入 | 弃用 | 备注 |
|---|---|---|---|---|
| gRPC Go 1.54.0 | active | — | — | — |
| gRPC Python 1.50.0 | active | — | — | — |
根因分析
服务器发送的 gRPC 响应缺少必需的 `grpc-status-details-bin` 尾部,客户端期望该尾部以进行更丰富的错误处理。
English
The server sent a gRPC response without the required `grpc-status-details-bin` trailer, which is expected by the client for richer error handling.
官方文档
https://grpc.io/docs/guides/error-handling/#error-details解决方案
-
Ensure the server sets the `grpc-status-details-bin` trailer using the `google.rpc.Status` proto. Example in Go: `st := status.New(codes.Internal, "error").WithDetails(&errdetails.RetryInfo{RetryDelay: &duration.Duration{Seconds: 1}})` then `st.Err()`. -
On the client, fall back to parsing `grpc-status` and `grpc-message` trailers if details are missing.
无效尝试
常见但无效的做法:
-
60% 失败
Retries are unrelated to status details in trailers.
-
80% 失败
Status details are only in trailers; headers may not contain the full error info.
-
40% 失败
The issue is not version-specific; it's about whether the server populates the trailer.