{
  "id": "python/fastapi-body-validation-error",
  "signature": "fastapi.exceptions.RequestValidationError: [{'loc': ['body', 'age'], 'msg': 'value is not a valid integer', 'type': 'type_error.integer'}]",
  "signature_zh": "fastapi.exceptions.RequestValidationError: [{'loc': ['body', 'age'], 'msg': '值不是有效的整数', 'type': 'type_error.integer'}]",
  "regex": "fastapi\\.exceptions\\.RequestValidationError:\\ \\[\\{'loc':\\ \\['body',\\ 'age'\\],\\ 'msg':\\ 'value\\ is\\ not\\ a\\ valid\\ integer',\\ 'type':\\ 'type_error\\.integer'\\}\\]",
  "domain": "python",
  "category": "type_error",
  "subcategory": null,
  "root_cause": "The request body contains a field that fails type validation, e.g., a string where an integer is expected.",
  "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": "It doesn't help the client correct the input; the error persists.",
      "fail_rate": 0.8,
      "condition": "",
      "sources": []
    },
    {
      "action": "",
      "why_fails": "This bypasses validation and can lead to runtime errors when processing the data.",
      "fail_rate": 0.6,
      "condition": "",
      "sources": []
    }
  ],
  "workarounds": [
    {
      "action": "",
      "success_rate": 0.95,
      "how": "Ensure the client sends valid data types: age: 25 instead of age: \"twenty-five\".",
      "condition": "",
      "sources": []
    },
    {
      "action": "",
      "success_rate": 0.85,
      "how": "Add custom validation logic or use Pydantic's Field constraints to give better error messages.",
      "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.88,
  "fix_success_rate": 0.8,
  "resolvable": "true",
  "first_seen": "2024-06-30",
  "last_confirmed": "2025-01-01",
  "last_updated": "2025-01-01",
  "evidence_count": 0,
  "tags": [],
  "locale": "en",
  "aliases": []
}