{
  "id": "go/grpc-invalid-argument-enum-value",
  "signature": "rpc error: code = InvalidArgument desc = invalid enum value: 42 for field 'status', expected 0-3",
  "signature_zh": "rpc错误：代码=无效参数 描述=字段'status'的枚举值无效：42，期望0-3",
  "regex": "rpc\\ error:\\ code\\ =\\ InvalidArgument\\ desc\\ =\\ invalid\\ enum\\ value:\\ 42\\ for\\ field\\ 'status',\\ expected\\ 0\\-3",
  "domain": "go",
  "category": "data_error",
  "subcategory": null,
  "root_cause": "The client sent an integer value that does not correspond to any valid enum constant defined in the protobuf schema.",
  "root_cause_type": "generic",
  "root_cause_zh": "客户端发送了一个整数，该整数不对应protobuf模式中定义的任何有效枚举常量。",
  "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": "Ignore the error and assume the server will accept any integer.",
      "why_fails": "The server validates enum values; invalid ones are rejected.",
      "fail_rate": 1.0,
      "condition": "",
      "sources": []
    },
    {
      "action": "Use a random integer within the range hoping it matches.",
      "why_fails": "Only specific integers are valid enum values; random ones will likely be invalid.",
      "fail_rate": 0.9,
      "condition": "",
      "sources": []
    }
  ],
  "workarounds": [
    {
      "action": "Ensure the enum value is within the defined set.",
      "success_rate": 0.95,
      "how": "validStatuses := map[int32]bool{0: true, 1: true, 2: true, 3: true}\nif !validStatuses[req.Status] {\n    return fmt.Errorf(\"invalid status: %d\", req.Status)\n}",
      "condition": "",
      "sources": []
    },
    {
      "action": "Use the generated enum constants from protobuf.",
      "success_rate": 0.9,
      "how": "req.Status = pb.Status_ACTIVE // Use the constant instead of raw integer",
      "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": "2025-11-20",
  "last_confirmed": "2025-01-01",
  "last_updated": "2025-01-01",
  "evidence_count": 0,
  "tags": [],
  "locale": "en",
  "aliases": []
}