debug: add logging to auth cookie handling
Add debug logging to understand why /auth/me succeeds but /users/me/config fails with 401.
This commit is contained in:
@@ -18,8 +18,14 @@ async def get_db_session():
|
||||
async def get_current_user_id(
|
||||
session_cookie: Annotated[str | None, Cookie()] = None,
|
||||
) -> uuid.UUID:
|
||||
import logging
|
||||
logger = logging.getLogger(__name__)
|
||||
|
||||
if not session_cookie:
|
||||
logger.warning("No session cookie found in request")
|
||||
raise HTTPException(status_code=status.HTTP_401_UNAUTHORIZED, detail="missing session")
|
||||
|
||||
logger.debug("Session cookie found: %s...", session_cookie[:20])
|
||||
|
||||
settings = Settings()
|
||||
try:
|
||||
|
||||
Reference in New Issue
Block a user