{
  "id": "python/fastapi-path-param-422-uuid",
  "signature": "fastapi.exceptions.RequestValidationError: path -> id\n  value is not a valid uuid (type=type_error.uuid)",
  "signature_zh": "fastapi.exceptions.RequestValidationError: path -> id：值不是有效的 uuid (type=type_error.uuid)",
  "regex": "fastapi\\.exceptions\\.RequestValidationError:\\ path\\ \\->\\ id\\\n\\ \\ value\\ is\\ not\\ a\\ valid\\ uuid\\ \\(type=type_error\\.uuid\\)",
  "domain": "python",
  "category": "data_error",
  "subcategory": null,
  "root_cause": "The path parameter is declared as UUID but the URL segment is not a valid UUID string.",
  "root_cause_type": "generic",
  "root_cause_zh": "路径参数声明为 UUID，但 URL 片段不是有效的 UUID 字符串。",
  "versions": [
    {
      "version": "3.x",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    }
  ],
  "os_specific": {},
  "dead_ends": [
    {
      "action": "",
      "why_fails": "Still fails if the regex matches but the value is not a UUID.",
      "fail_rate": 0.75,
      "condition": "",
      "sources": []
    },
    {
      "action": "",
      "why_fails": "Validation runs before the handler; except never triggers.",
      "fail_rate": 0.9,
      "condition": "",
      "sources": []
    }
  ],
  "workarounds": [
    {
      "action": "",
      "success_rate": 0.9,
      "how": "@app.get('/items/{item_id}')\ndef get(item_id: str):\n    try: uid = UUID(item_id)\n    except ValueError: raise HTTPException(400)",
      "condition": "",
      "sources": []
    },
    {
      "action": "",
      "success_rate": 0.88,
      "how": "from fastapi import Path\ndef get(item_id: UUID = Path(...)): ...",
      "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.86,
  "fix_success_rate": 0.8,
  "resolvable": "true",
  "first_seen": "2024-07-08",
  "last_confirmed": "2025-01-01",
  "last_updated": "2025-01-01",
  "evidence_count": 0,
  "tags": [],
  "locale": "en",
  "aliases": []
}