# rpc 错误：代码 = InvalidArgument 描述 = 字段无效：name：值必须非空

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

## 根因

服务器端验证失败，因为必填的 proto 字段为空或格式错误。

## 版本兼容性

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

## 解决方案

1. **** (90% 成功率)
   ```
   if req.Name == "" { return status.Error(codes.InvalidArgument, "name required") }
   ```
2. **** (70% 成功率)
   ```
   fieldMask := &fieldmaskpb.FieldMask{Paths: []string{"name"}}; req.FieldMask = fieldMask
   ```

## 无效尝试

- **** — The request is invalid; retrying will cause the same error. (100% 失败率)
- **** — Type change doesn't fix the underlying validation logic. (90% 失败率)
