{
  "id": "python/flask-405-method-not-allowed",
  "signature": "werkzeug.exceptions.MethodNotAllowed: 405 Method Not Allowed: The method is not allowed for the requested URL.",
  "signature_zh": "werkzeug.exceptions.MethodNotAllowed: 405 方法不被允许：请求的 URL 不允许该请求方法。",
  "regex": "werkzeug\\.exceptions\\.MethodNotAllowed:\\ 405\\ Method\\ Not\\ Allowed:\\ The\\ method\\ is\\ not\\ allowed\\ for\\ the\\ requested\\ URL\\.",
  "domain": "python",
  "category": "runtime_error",
  "subcategory": null,
  "root_cause": "The route is registered for a different HTTP method (e.g. only GET) while the client sends POST/PUT/DELETE.",
  "root_cause_type": "generic",
  "root_cause_zh": "路由注册的 HTTP 方法与客户端发送的方法不一致（例如只注册了 GET 而客户端发送 POST/PUT/DELETE）。",
  "versions": [
    {
      "version": "3.x",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    }
  ],
  "os_specific": {},
  "dead_ends": [
    {
      "action": "",
      "why_fails": "CSRF produces 400/403, not 405; the route method list is the actual cause.",
      "fail_rate": 0.85,
      "condition": "",
      "sources": []
    },
    {
      "action": "",
      "why_fails": "Masks the real routing mismatch and breaks clients.",
      "fail_rate": 0.8,
      "condition": "",
      "sources": []
    }
  ],
  "workarounds": [
    {
      "action": "",
      "success_rate": 0.96,
      "how": "@app.route('/submit', methods=['GET', 'POST'])\ndef submit(): ...",
      "condition": "",
      "sources": []
    },
    {
      "action": "",
      "success_rate": 0.9,
      "how": "@app.post('/submit')\ndef submit_post(): ...",
      "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-04-09",
  "last_confirmed": "2025-01-01",
  "last_updated": "2025-01-01",
  "evidence_count": 0,
  "tags": [],
  "locale": "en",
  "aliases": []
}