{
  "id": "go/grpc-invalid-argument-field-validation",
  "signature": "rpc error: code = InvalidArgument desc = field 'name' must not be empty",
  "signature_zh": "rpc错误：代码=无效参数 描述=字段'name'不能为空",
  "regex": "rpc\\ error:\\ code\\ =\\ InvalidArgument\\ desc\\ =\\ field\\ 'name'\\ must\\ not\\ be\\ empty",
  "domain": "go",
  "category": "data_error",
  "subcategory": null,
  "root_cause": "The client sent a request with invalid or missing required fields, often due to missing validation.",
  "root_cause_type": "generic",
  "root_cause_zh": "客户端发送的请求包含无效或缺少必填字段，通常是由于缺少验证。",
  "versions": [
    {
      "version": "1.0",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    },
    {
      "version": "1.1",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    }
  ],
  "os_specific": {},
  "dead_ends": [
    {
      "action": "Send the request with empty fields again.",
      "why_fails": "The server will reject it for the same reason.",
      "fail_rate": 1.0,
      "condition": "",
      "sources": []
    },
    {
      "action": "Ignore the error and proceed with partial data.",
      "why_fails": "The RPC failed, so no data was processed.",
      "fail_rate": 0.95,
      "condition": "",
      "sources": []
    }
  ],
  "workarounds": [
    {
      "action": "Validate all required fields before making the RPC call.",
      "success_rate": 0.9,
      "how": "if req.Name == \"\" {\n    return fmt.Errorf(\"name is required\")\n}\nif req.Age < 0 {\n    return fmt.Errorf(\"age must be non-negative\")\n}\nresp, err := client.SomeRPC(ctx, req)",
      "condition": "",
      "sources": []
    },
    {
      "action": "Use protobuf validation annotations and generate validation code.",
      "success_rate": 0.85,
      "how": "In .proto: message MyRequest { string name = 1 [(validate.rules).string.min_len = 1]; }\nThen call: if err := req.Validate(); err != nil { return err }",
      "condition": "",
      "sources": []
    }
  ],
  "workarounds_zh": [],
  "transition_graph": {
    "leads_to": [],
    "preceded_by": [],
    "frequently_confused_with": []
  },
  "official_doc_url": null,
  "official_doc_section": null,
  "error_code": null,
  "verification_tier": "ai_generated",
  "confidence": 0.88,
  "fix_success_rate": 0.8,
  "resolvable": "true",
  "first_seen": "2024-08-30",
  "last_confirmed": "2025-01-01",
  "last_updated": "2025-01-01",
  "evidence_count": 0,
  "tags": [],
  "locale": "en",
  "aliases": []
}