# RuntimeError: No response returned.

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

## Root Cause

An async view function does not return a valid response object.

## Version Compatibility

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

## Workarounds

1. **Return a Response object** (95% success)
   ```
   from starlette.responses import JSONResponse
async def handle(request):
    return JSONResponse({'message': 'OK'})
   ```
2. **Use PlainTextResponse for simple text** (90% success)
   ```
   from starlette.responses import PlainTextResponse
async def handle(request):
    return PlainTextResponse('Hello')
   ```

## Dead Ends

- **Returning a string directly** — Starlette expects a Response object, not a string. (80% fail)
- **Forgetting return statement entirely** — Function returns None. (90% fail)
