{
  "id": "python/fastapi-responsevalidationerror",
  "signature": "fastapi.exceptions.ResponseValidationError: 1 validation error for ResponseModel",
  "signature_zh": "fastapi.exceptions.ResponseValidationError：ResponseModel 有 1 个验证错误",
  "regex": "fastapi\\.exceptions\\.ResponseValidationError:\\ 1\\ validation\\ error\\ for\\ ResponseModel",
  "domain": "python",
  "category": "runtime_error",
  "subcategory": null,
  "root_cause": "The data returned from the endpoint doesn't match the declared response_model schema.",
  "root_cause_type": "generic",
  "root_cause_zh": "端点返回的数据与声明的 response_model 模式不匹配。",
  "versions": [
    {
      "version": "0.100.x",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    },
    {
      "version": "0.110.x",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    }
  ],
  "os_specific": {},
  "dead_ends": [
    {
      "action": "",
      "why_fails": "Loses automatic documentation and validation, not a fix.",
      "fail_rate": 0.7,
      "condition": "",
      "sources": []
    },
    {
      "action": "",
      "why_fails": "Only excludes unset fields, doesn't fix type mismatches.",
      "fail_rate": 0.8,
      "condition": "",
      "sources": []
    }
  ],
  "workarounds": [
    {
      "action": "",
      "success_rate": 0.9,
      "how": "@app.get('/item', response_model=Item)\ndef get_item():\n    return {\"name\": \"foo\", \"price\": 10.0}",
      "condition": "",
      "sources": []
    },
    {
      "action": "",
      "success_rate": 0.85,
      "how": "from typing import Union\n@app.get('/item', response_model=Union[Item, Error])",
      "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-05-12",
  "last_confirmed": "2025-01-01",
  "last_updated": "2025-01-01",
  "evidence_count": 0,
  "tags": [],
  "locale": "en",
  "aliases": []
}