Commit eaad5971 authored by mashony's avatar mashony
Browse files

fix: add logging if user not exist in auth file

parent 2ae8e4b5
......@@ -95,7 +95,11 @@ def load_auth(file_path: str) -> None:
def _get_user_by_token(token: str) -> Optional[User]:
return AUTH_FILE.get(hash_token(token))
hashed_token = hash_token(token)
user = AUTH_FILE.get(hashed_token)
if not user:
LOG.warning(f"User with hashed token {hashed_token} not found in auth file")
return user
def get_user_legal_name_by_name(user_name):
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment