{
  "id": "python/fastapi-http-exception-handler",
  "signature": "fastapi.exceptions.HTTPException: 404 Not Found",
  "signature_zh": "FastAPI 异常：404 未找到",
  "regex": "fastapi\\.exceptions\\.HTTPException:\\ 404\\ Not\\ Found",
  "domain": "python",
  "category": "runtime_error",
  "subcategory": null,
  "root_cause": "请求的 URL 路径不存在或未定义路由。",
  "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": "",
      "why_fails": "会隐藏真正的 404 错误，导致客户端困惑",
      "fail_rate": 0.7,
      "condition": "",
      "sources": []
    },
    {
      "action": "",
      "why_fails": "会拦截所有请求，导致其他路由失效",
      "fail_rate": 0.9,
      "condition": "",
      "sources": []
    }
  ],
  "workarounds": [
    {
      "action": "",
      "success_rate": 0.95,
      "how": "@app.exception_handler(404)\nasync def not_found_handler(request, exc):\n    return JSONResponse(status_code=404, content={'message': 'Not Found'})",
      "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.84,
  "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": []
}