# fastapi.exceptions.HTTPException：422 不可处理实体

- **ID:** `python/fastapi-http-exception-detail`
- **领域:** python
- **类别:** runtime_error
- **验证级别:** ai_generated
- **修复率:** 80%

## 根因

请求验证失败；当 Pydantic 验证失败时 FastAPI 返回 422。

## 版本兼容性

| 版本 | 状态 | 引入 | 弃用 |
|------|------|------|------|
| 0.100.x | active | — | — |
| 0.110.x | active | — | — |

## 解决方案

1. **** (95% 成功率)
   ```
   The JSON response contains the specific field and error.
   ```
2. **** (90% 成功率)
   ```
   Use the /docs interface to test payloads.
   ```

## 无效尝试

- **** — Changes status code but not the underlying validation error. (70% 失败率)
- **** — Irrelevant to request validation. (90% 失败率)
