# fastapi.exceptions.FastAPIError: Dependency overrides are not supported for this dependency.

- **ID:** `python/fastapi-dependency-override`
- **Domain:** python
- **Category:** runtime_error
- **Verification:** ai_generated
- **Fix Rate:** 80%

## Root Cause

Attempting to override a dependency that is not a function or callable, or using incorrect override syntax.

## Version Compatibility

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

## Workarounds

1. **** (95% success)
   ```
   def get_db():
    return 'real'
app.dependency_overrides[get_db] = lambda: 'fake'
   ```
2. **** (85% success)
   ```
   class Dep:
    def __call__(self):
        return 'real'
app.dependency_overrides[Dep()] = lambda: 'fake'
   ```

## Dead Ends

- **** — If dep is not a function, this fails. (60% fail)
- **** — Fragile and not recommended. (80% fail)
