Skip to content

Commit

Permalink
Fix test failure
Browse files Browse the repository at this point in the history
  • Loading branch information
amolk committed Jan 2, 2025
1 parent 3fafcfa commit f33630c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions website/api/session.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import secrets
from base64 import b64encode

from cryptography.fernet import Fernet
from cryptography.fernet import Fernet, InvalidToken
from database import Base, SessionLocal, engine
from fastapi import Request, Response
from models import UserSession
Expand Down Expand Up @@ -71,7 +71,7 @@ async def get_or_create_session(self, request: Request, db) -> UserSession:
except Exception as e:
print(f"Database error: {e}")
# Fall through to create new session
except (json.JSONDecodeError, ValueError) as e:
except (json.JSONDecodeError, ValueError, InvalidToken) as e:
print(f"Session decoding error: {e}")
pass

Expand Down

0 comments on commit f33630c

Please sign in to comment.