# Exception in thread Thread-1 (run) ... AttributeError: 'NoneType' object has no attribute 'send'

- **ID:** `python/fastapi-background-task-exception-silent`
- **Domain:** python
- **Category:** runtime_error
- **Verification:** ai_generated
- **Fix Rate:** 80%

## Root Cause

A background task raised an exception after the response was sent; Starlette logs it but the client never sees it.

## Version Compatibility

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

## Workarounds

1. **** (90% success)
   ```
   def task():\n    try:\n        work()\n    except Exception:\n        logger.exception('bg failed')
   ```
2. **** (92% success)
   ```
   @celery.task\ndef task(): ...\ntask.delay()
   ```

## Dead Ends

- **** — Background tasks cannot return responses to the client. (85% fail)
- **** — Still runs after response; exceptions remain invisible to client. (70% fail)
