# RuntimeError: No response returned.

- **ID:** `python/starlette-runtimeerror-no-response-returned`
- **Domain:** python
- **Category:** runtime_error
- **Verification:** ai_generated
- **Fix Rate:** 80%

## Root Cause

An ASGI middleware or endpoint returns None instead of a Response, or an exception is swallowed inside a BaseHTTPMiddleware dispatch.

## Version Compatibility

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

## Workarounds

1. **** (93% success)
   ```
   class M(BaseHTTPMiddleware):
    async def dispatch(self, request, call_next):
        response = await call_next(request)
        return response
   ```
2. **** (90% success)
   ```
   try:
    response = await call_next(request)
except Exception:
    raise
   ```

## Dead Ends

- **** — Hides the original exception and breaks streaming responses. (75% fail)
- **** — Behavior persists across versions; root cause is the middleware logic. (80% fail)
