# rpc 错误：代码 = Unknown 描述 = 状态格式错误：无状态详情

- **ID:** `go/grpc-status-details-missing`
- **领域:** go
- **类别:** data_error
- **验证级别:** ai_generated
- **修复率:** 80%

## 根因

服务器返回的状态没有详情，但客户端期望 google.rpc.Status 详情，导致 proto 反序列化失败。

## 版本兼容性

| 版本 | 状态 | 引入 | 弃用 |
|------|------|------|------|
| 1.0 | active | — | — |

## 解决方案

1. **** (90% 成功率)
   ```
   if s, ok := status.FromError(err); ok { for _, d := range s.Details() { /* handle */ } }
   ```
2. **** (80% 成功率)
   ```
   st := status.New(codes.Unknown, "error"); st, _ = st.WithDetails(&errdetails.ErrorInfo{}); return st.Err()
   ```

## 无效尝试

- **** — Server logs show no error because the status is intentionally empty; issue is in client-side parsing. (70% 失败率)
- **** — Credentials are not the issue; the problem is in the status detail parsing logic. (90% 失败率)
