{
  "id": "python/flask-abort-http-exception",
  "signature": "werkzeug.exceptions.NotFound: 404 Not Found",
  "signature_zh": "werkzeug.exceptions.NotFound: 404 未找到",
  "regex": "werkzeug\\.exceptions\\.NotFound:\\ 404\\ Not\\ Found",
  "domain": "python",
  "category": "runtime_error",
  "subcategory": null,
  "root_cause": "The abort(404) function is called, but the error handler is not properly set up to return a custom response.",
  "root_cause_type": "generic",
  "root_cause_zh": "调用了 abort(404) 函数，但未正确设置错误处理器来返回自定义响应。",
  "versions": [
    {
      "version": "3.x",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    }
  ],
  "os_specific": {},
  "dead_ends": [
    {
      "action": "",
      "why_fails": "This masks the error and gives incorrect status codes.",
      "fail_rate": 0.8,
      "condition": "",
      "sources": []
    },
    {
      "action": "",
      "why_fails": "This is not suitable for APIs that need JSON responses.",
      "fail_rate": 0.7,
      "condition": "",
      "sources": []
    }
  ],
  "workarounds": [
    {
      "action": "",
      "success_rate": 0.95,
      "how": "Register an error handler: @app.errorhandler(404) def not_found(e): return jsonify(error='Not Found'), 404",
      "condition": "",
      "sources": []
    },
    {
      "action": "",
      "success_rate": 0.9,
      "how": "Use abort(404, description=\"Custom message\") and handle it in the handler.",
      "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.9,
  "fix_success_rate": 0.8,
  "resolvable": "true",
  "first_seen": "2024-01-28",
  "last_confirmed": "2025-01-01",
  "last_updated": "2025-01-01",
  "evidence_count": 0,
  "tags": [],
  "locale": "en",
  "aliases": []
}