# fastapi.exceptions.ResponseValidationError: 1 validation error for ResponseModel

- **ID:** `python/fastapi-responsevalidationerror`
- **Domain:** python
- **Category:** runtime_error
- **Verification:** ai_generated
- **Fix Rate:** 80%

## Root Cause

The data returned from the endpoint doesn't match the declared response_model schema.

## Version Compatibility

| Version | Status | Introduced | Deprecated |
|---------|--------|------------|------------|
| 0.100.x | active | — | — |
| 0.110.x | active | — | — |

## Workarounds

1. **** (90% success)
   ```
   @app.get('/item', response_model=Item)
def get_item():
    return {"name": "foo", "price": 10.0}
   ```
2. **** (85% success)
   ```
   from typing import Union
@app.get('/item', response_model=Union[Item, Error])
   ```

## Dead Ends

- **** — Loses automatic documentation and validation, not a fix. (70% fail)
- **** — Only excludes unset fields, doesn't fix type mismatches. (80% fail)
