{
  "id": "python/starlette-route-order-shadowing",
  "signature": "AssertionError: Route order matters, overlapping routes detected",
  "signature_zh": "断言错误：路由顺序重要，检测到重叠路由。",
  "regex": "AssertionError:\\ Route\\ order\\ matters,\\ overlapping\\ routes\\ detected",
  "domain": "python",
  "category": "config_error",
  "subcategory": null,
  "root_cause": "Defining a catch-all or parameterized route before a specific route causes shadowing.",
  "root_cause_type": "generic",
  "root_cause_zh": "在特定路由之前定义了通配符或参数化路由，导致遮蔽。",
  "versions": [
    {
      "version": "3.x",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    }
  ],
  "os_specific": {},
  "dead_ends": [
    {
      "action": "",
      "why_fails": "Loses functionality; should reorder instead.",
      "fail_rate": 0.5,
      "condition": "",
      "sources": []
    },
    {
      "action": "",
      "why_fails": "Regex may still match broader patterns.",
      "fail_rate": 0.6,
      "condition": "",
      "sources": []
    }
  ],
  "workarounds": [
    {
      "action": "",
      "success_rate": 0.95,
      "how": "Define specific routes first: routes = [\n    Route('/users/me', me),\n    Route('/users/{user_id}', user),\n]",
      "condition": "",
      "sources": []
    },
    {
      "action": "",
      "success_rate": 0.9,
      "how": "Use path converters with constraints: Route('/files/{path:path}', file_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.82,
  "fix_success_rate": 0.8,
  "resolvable": "true",
  "first_seen": "2024-07-28",
  "last_confirmed": "2025-01-01",
  "last_updated": "2025-01-01",
  "evidence_count": 0,
  "tags": [],
  "locale": "en",
  "aliases": []
}