Skip to content
Snippets Groups Projects
Commit 07dcba5d authored by Jeremy M Fee's avatar Jeremy M Fee
Browse files

Log session load exceptions

parent 67eeb206
No related branches found
No related tags found
1 merge request!193Api hotfix sqlalchemy
import json import json
from typing import Callable, Dict, Mapping import logging
import uuid import uuid
from typing import Callable, Dict, Mapping
from cryptography.fernet import Fernet from cryptography.fernet import Fernet
from starlette.datastructures import MutableHeaders from starlette.datastructures import MutableHeaders
...@@ -73,6 +74,7 @@ class SessionMiddleware: ...@@ -73,6 +74,7 @@ class SessionMiddleware:
scope["session"] = await self.get_session(session_id) scope["session"] = await self.get_session(session_id)
initial_session_was_empty = False initial_session_was_empty = False
except Exception: except Exception:
logging.exception(f"Error loading session {session_id}")
scope["session"] = {} scope["session"] = {}
else: else:
scope["session"] = {} scope["session"] = {}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment