# rpc 错误：代码 = InvalidArgument 描述 = 字段 status 的枚举值无效：99

- **ID:** `go/grpc-out-of-range-enum-value`
- **领域:** go
- **类别:** data_error
- **验证级别:** ai_generated
- **修复率:** 80%

## 根因

客户端发送的整数未映射到 proto 中定义的任何枚举值。

## 版本兼容性

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

## 解决方案

1. **** (95% 成功率)
   ```
   if status < pb.Status_STATUS_UNKNOWN || status > pb.Status_STATUS_DONE { return error }
   ```
2. **** (80% 成功率)
   ```
   // Use protoreflect to check if value is defined.
   ```

## 无效尝试

- **** — Go will allow the conversion but protobuf deserialization will fail. (80% 失败率)
- **** — The server will reject the message. (100% 失败率)
