diff --git a/backend/auth.py b/backend/auth.py index 15c1bc4..746b923 100644 --- a/backend/auth.py +++ b/backend/auth.py @@ -68,8 +68,8 @@ def _decode_token(token: str, jwks): except HTTPException: raise except Exception as exc: - logger.warning("Token verification failed", error=str(exc)) - raise HTTPException(status_code=401, detail="Invalid token") from None + logger.warning("Token verification failed", error_type=type(exc).__name__, error=str(exc)) + raise HTTPException(status_code=401, detail=f"Invalid token ({type(exc).__name__})") from None def require_auth(authorization: str | None = Header(None)):