# ClientDisconnected: Client disconnected while sending request body

- **ID:** `python/starlette-request-client-disconnect`
- **Domain:** python
- **Category:** network_error
- **Verification:** ai_generated
- **Fix Rate:** 80%

## Root Cause

The client closes the connection before the request body is fully received.

## Version Compatibility

| Version | Status | Introduced | Deprecated |
|---------|--------|------------|------------|
| 3.x | active | — | — |

## Workarounds

1. **** (80% success)
   ```
   Handle the exception gracefully and log it: except ClientDisconnected: logger.warning('Client disconnected')
   ```
2. **** (70% success)
   ```
   Use a middleware to catch and return a 499 status code
   ```

## Dead Ends

- **** — The request is incomplete; continuing may cause data corruption. (50% fail)
- **** — The client is gone; timeout won't help. (30% fail)
