{
  "id": "python/starlette-httpexception-401",
  "signature": "starlette.exceptions.HTTPException: 401: Unauthorized",
  "signature_zh": "starlette.exceptions.HTTPException：401: 未授权",
  "regex": "starlette\\.exceptions\\.HTTPException:\\ 401:\\ Unauthorized",
  "domain": "python",
  "category": "auth_error",
  "subcategory": null,
  "root_cause": "Authentication credentials are missing or invalid.",
  "root_cause_type": "generic",
  "root_cause_zh": "身份验证凭据缺失或无效。",
  "versions": [
    {
      "version": "0.30.x",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    },
    {
      "version": "0.40.x",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    }
  ],
  "os_specific": {},
  "dead_ends": [
    {
      "action": "",
      "why_fails": "Exposes protected endpoints.",
      "fail_rate": 0.9,
      "condition": "",
      "sources": []
    },
    {
      "action": "",
      "why_fails": "Security risk.",
      "fail_rate": 0.95,
      "condition": "",
      "sources": []
    }
  ],
  "workarounds": [
    {
      "action": "",
      "success_rate": 0.95,
      "how": "headers = {'Authorization': f'Bearer {token}'}",
      "condition": "",
      "sources": []
    },
    {
      "action": "",
      "success_rate": 0.9,
      "how": "If 401, use refresh token to get a new access token.",
      "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.89,
  "fix_success_rate": 0.8,
  "resolvable": "true",
  "first_seen": "2025-07-05",
  "last_confirmed": "2025-01-01",
  "last_updated": "2025-01-01",
  "evidence_count": 0,
  "tags": [],
  "locale": "en",
  "aliases": []
}