# rpc 错误：代码 = Unknown 描述 = 响应中的未知字段："extra_data"

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

## 根因

客户端的 proto 定义过时，未包含服务器发送的字段。

## 版本兼容性

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

## 解决方案

1. **** (100% 成功率)
   ```
   Run protoc with the latest .proto file to update the generated Go code.
   ```
2. **** (60% 成功率)
   ```
   decoder := protojson.UnmarshalOptions{DiscardUnknown: true}; err := decoder.Unmarshal(data, msg)
   ```

## 无效尝试

- **** — gRPC by default ignores unknown fields, but this error suggests strict parsing is enabled. (80% 失败率)
- **** — Incorrect field number can cause data corruption. (90% 失败率)
