{
  "id": "go/grpc-invalid-argument-field-type",
  "signature": "rpc error: code = InvalidArgument desc = expected string, got number for field age",
  "signature_zh": "rpc 错误：代码 = InvalidArgument 描述 = 字段 age 期望字符串，但得到数字",
  "regex": "rpc\\ error:\\ code\\ =\\ InvalidArgument\\ desc\\ =\\ expected\\ string,\\ got\\ number\\ for\\ field\\ age",
  "domain": "go",
  "category": "type_error",
  "subcategory": null,
  "root_cause": "The protobuf message field type mismatch; e.g., sending an integer where a string is expected.",
  "root_cause_type": "generic",
  "root_cause_zh": "protobuf 消息字段类型不匹配；例如，在期望字符串的地方发送了整数。",
  "versions": [
    {
      "version": "1.56.x",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    },
    {
      "version": "1.57.x",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    }
  ],
  "os_specific": {},
  "dead_ends": [
    {
      "action": "Continuing to send incorrect type.",
      "why_fails": "Same error persists.",
      "fail_rate": 1.0,
      "condition": "",
      "sources": []
    },
    {
      "action": "Using type assertion without changing proto.",
      "why_fails": "Proto definition determines wire format.",
      "fail_rate": 0.8,
      "condition": "",
      "sources": []
    },
    {
      "action": "Blaming server for type checking.",
      "why_fails": "Client must follow proto definition.",
      "fail_rate": 0.5,
      "condition": "",
      "sources": []
    }
  ],
  "workarounds": [
    {
      "action": "",
      "success_rate": 0.95,
      "how": "string age = 1; protoc --go_out=. *.proto",
      "condition": "",
      "sources": []
    },
    {
      "action": "",
      "success_rate": 0.9,
      "how": "req := &pb.Person{Age: strconv.Itoa(30)}",
      "condition": "",
      "sources": []
    },
    {
      "action": "",
      "success_rate": 0.85,
      "how": "if _, ok := req.Age.(string); !ok { return status.Error(codes.InvalidArgument, \"age must be string\") }",
      "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.85,
  "fix_success_rate": 0.8,
  "resolvable": "true",
  "first_seen": "2025-04-15",
  "last_confirmed": "2025-01-01",
  "last_updated": "2025-01-01",
  "evidence_count": 0,
  "tags": [],
  "locale": "en",
  "aliases": []
}