mirror of
https://github.com/rommapp/romm.git
synced 2026-11-29 10:01:00 +01:00
HybridAuthBackend runs inside Starlette's AuthenticationMiddleware, so an HTTPException raised while validating a JWT bearer token (expired, bad signature, garbage) or parsing a malformed Basic header bypassed FastAPI's exception handlers and surfaced as a 500 on every endpoint, including /api/heartbeat. Return None instead, matching the rmm_ client token path: public endpoints respond normally and protected ones return 401. Fixes #4788 Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>