{
  "id": "go/grpc-out-of-range-invalid-argument",
  "signature": "rpc error: code = OutOfRange desc = index out of range: 10 (max 5)",
  "signature_zh": "rpc 错误：code = OutOfRange desc = 索引超出范围：10（最大 5）",
  "regex": "rpc\\ error:\\ code\\ =\\ OutOfRange\\ desc\\ =\\ index\\ out\\ of\\ range:\\ 10\\ \\(max\\ 5\\)",
  "domain": "go",
  "category": "data_error",
  "subcategory": null,
  "root_cause": "The client provided a parameter that is outside the valid range, such as an index or a value exceeding limits.",
  "root_cause_type": "generic",
  "root_cause_zh": "客户端提供的参数超出有效范围，例如索引或值超过限制。",
  "versions": [
    {
      "version": "1.x",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    }
  ],
  "os_specific": {},
  "dead_ends": [
    {
      "action": "",
      "why_fails": "This may not be semantically correct and could hide client-side bugs.",
      "fail_rate": 0.7,
      "condition": "",
      "sources": []
    },
    {
      "action": "",
      "why_fails": "The operation will likely fail or produce incorrect results.",
      "fail_rate": 0.9,
      "condition": "",
      "sources": []
    }
  ],
  "workarounds": [
    {
      "action": "",
      "success_rate": 0.95,
      "how": "if index >= len(slice) {\n    return fmt.Errorf(\"index %d out of range\", index)\n}\n// Proceed with RPC",
      "condition": "",
      "sources": []
    },
    {
      "action": "",
      "success_rate": 0.9,
      "how": "resp, err := client.Method(ctx, req)\nif status.Code(err) == codes.OutOfRange {\n    // Log and return user-friendly error\n    return fmt.Errorf(\"invalid parameter: %v\", err)\n}",
      "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-02-15",
  "last_confirmed": "2025-01-01",
  "last_updated": "2025-01-01",
  "evidence_count": 0,
  "tags": [],
  "locale": "en",
  "aliases": []
}