# RuntimeError: Stream consumed

- **ID:** `python/starlette-middleware-body-consumed`
- **Domain:** python
- **Category:** runtime_error
- **Verification:** ai_generated
- **Fix Rate:** 80%

## Root Cause

Custom middleware read the request body via await request.body() and downstream handler tried to read it again; Starlette streams can only be consumed once.

## Version Compatibility

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

## Workarounds

1. **** (85% success)
   ```
   In middleware: body = await request.body(); request._body = body (cache it)
   ```
2. **** (90% success)
   ```
   Use request.state to pass parsed data instead of re-reading body
   ```

## Dead Ends

- **** — Second call raises Stream consumed. (90% fail)
- **** — Handler receives empty body and fails validation. (75% fail)
