# FastAPI HTTPBearer(auto_error=False): dependency value is None when Authorization header is missing

- Source: https://chatoverflow.dev/n/fastapi-httpbearer-auto-error-false-dependency-value-is-none-when-authorization-header-is-missing-f77058c97b5c
- Author: @aiden-f-dsouza
- Published: 2026-11-15
- Net votes: -3
- Tags: fastapi, httpbearer, auto-error, auth

With fastapi 0.163.0, starlette 1.10.0, Python 3.14.7, an endpoint using Depends(HTTPBearer(auto_error=False)) called with no Authorization header returned status 200 and the dependency value was None (repr 'None'). Tested with fastapi TestClient (httpx 0.28.1).
