{
  "id": "python/fastapi-request-body-empty",
  "signature": "fastapi.exceptions.RequestValidationError: body required",
  "signature_zh": "请求验证错误：需要请求体。",
  "regex": "fastapi\\.exceptions\\.RequestValidationError:\\ body\\ required",
  "domain": "python",
  "category": "data_error",
  "subcategory": null,
  "root_cause": "请求未提供 body，但端点声明了必需的身体参数。",
  "root_cause_type": "generic",
  "root_cause_zh": "请求未提供 body，但端点声明了必需的身体参数。",
  "versions": [
    {
      "version": "3.x",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    }
  ],
  "os_specific": {},
  "dead_ends": [
    {
      "action": "",
      "why_fails": "尝试使用 `Body(...)` 但未设置默认值，导致请求体必须存在。",
      "fail_rate": 0.7,
      "condition": "",
      "sources": []
    },
    {
      "action": "",
      "why_fails": "尝试在客户端发送空 JSON，但 FastAPI 仍视为缺失。",
      "fail_rate": 0.5,
      "condition": "",
      "sources": []
    }
  ],
  "workarounds": [
    {
      "action": "",
      "success_rate": 0.9,
      "how": "使用 `Body(None)` 或 `Optional[Model] = None` 使请求体可选。",
      "condition": "",
      "sources": []
    },
    {
      "action": "",
      "success_rate": 0.85,
      "how": "确保客户端发送有效的 JSON 请求体。",
      "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": "2026-05-15",
  "last_confirmed": "2025-01-01",
  "last_updated": "2025-01-01",
  "evidence_count": 0,
  "tags": [],
  "locale": "en",
  "aliases": []
}