From 8e6fec6962ec926a62e47cf19936afd73ef15f64 Mon Sep 17 00:00:00 2001 From: Davood Heidarpour Date: Wed, 2 Sep 2026 16:35:26 +0330 Subject: [PATCH 1/2] fix: err handling python 2 -> python 3 --- backend/app/api/deps.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/backend/app/api/deps.py b/backend/app/api/deps.py index 5f28ec692a..4fb1c6574b 100644 --- a/backend/app/api/deps.py +++ b/backend/app/api/deps.py @@ -33,7 +33,7 @@ def get_current_user(session: SessionDep, token: TokenDep) -> User: token, settings.SECRET_KEY, algorithms=[security.ALGORITHM] ) token_data = TokenPayload(**payload) - except InvalidTokenError, ValidationError: + except (InvalidTokenError, ValidationError): raise HTTPException( status_code=status.HTTP_403_FORBIDDEN, detail="Could not validate credentials", From 531bd3ef339f5b828a20ff02f7ea9248e6f20781 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci-lite[bot]" <117423508+pre-commit-ci-lite[bot]@users.noreply.github.com> Date: Wed, 2 Sep 2026 13:08:09 +0000 Subject: [PATCH 2/2] =?UTF-8?q?=F0=9F=8E=A8=20Auto=20format=20and=20update?= =?UTF-8?q?=20with=20pre-commit?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- backend/app/api/deps.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/backend/app/api/deps.py b/backend/app/api/deps.py index 4fb1c6574b..5f28ec692a 100644 --- a/backend/app/api/deps.py +++ b/backend/app/api/deps.py @@ -33,7 +33,7 @@ def get_current_user(session: SessionDep, token: TokenDep) -> User: token, settings.SECRET_KEY, algorithms=[security.ALGORITHM] ) token_data = TokenPayload(**payload) - except (InvalidTokenError, ValidationError): + except InvalidTokenError, ValidationError: raise HTTPException( status_code=status.HTTP_403_FORBIDDEN, detail="Could not validate credentials",