{
  "id": "python/fastapi-httpexception-not-found",
  "signature": "fastapi.HTTPException: 404 Not Found",
  "signature_zh": "FastAPI HTTP异常：404未找到",
  "regex": "fastapi\\.HTTPException:\\ 404\\ Not\\ Found",
  "domain": "python",
  "category": "runtime_error",
  "subcategory": null,
  "root_cause": "Requested URL does not match any defined route.",
  "root_cause_type": "generic",
  "root_cause_zh": "请求的URL与任何定义的路由不匹配。",
  "versions": [
    {
      "version": "3.x",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    }
  ],
  "os_specific": {},
  "dead_ends": [
    {
      "action": "Assuming trailing slash doesn't matter",
      "why_fails": "FastAPI distinguishes between /path and /path/ unless configured.",
      "fail_rate": 0.5,
      "condition": "",
      "sources": []
    },
    {
      "action": "Using wrong HTTP method",
      "why_fails": "Route may exist but not for the used method (e.g., POST vs GET).",
      "fail_rate": 0.7,
      "condition": "",
      "sources": []
    }
  ],
  "workarounds": [
    {
      "action": "Verify URL and method match a route",
      "success_rate": 0.9,
      "how": "Check app routes: for route in app.routes: print(route.path, route.methods)",
      "condition": "",
      "sources": []
    },
    {
      "action": "Add a catch-all route for debugging",
      "success_rate": 0.8,
      "how": "@app.api_route('/{path:path}', methods=['GET', 'POST'])\nasync def catch_all(path: str):\n    return {'path': 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.87,
  "fix_success_rate": 0.8,
  "resolvable": "true",
  "first_seen": "2024-06-15",
  "last_confirmed": "2025-01-01",
  "last_updated": "2025-01-01",
  "evidence_count": 0,
  "tags": [],
  "locale": "en",
  "aliases": []
}