diff --git a/ui/temboardui/web/flask.py b/ui/temboardui/web/flask.py index d32aaf759..76e055f7e 100644 --- a/ui/temboardui/web/flask.py +++ b/ui/temboardui/web/flask.py @@ -297,7 +297,10 @@ def load_user_from_tornado_secure_cookie(self): ) if cookie: cookie = cookie.decode("utf-8") - return get_role_by_cookie(g.db_session, cookie) + try: + return get_role_by_cookie(g.db_session, cookie) + except Exception as e: + logger.error("Failed to load user from cookie: %s", e) class InstanceMiddleware: