From 02b2463d058c571e7574ba2c372814e6de02a3cc Mon Sep 17 00:00:00 2001 From: Thonyk Date: Sun, 29 Sep 2024 21:45:25 +0200 Subject: [PATCH] Revert "Fix: except not enough segment exception" This reverts commit 802e1de8a72353e582214cfd123c417f6a71367f. --- app/utils/auth/auth_utils.py | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/app/utils/auth/auth_utils.py b/app/utils/auth/auth_utils.py index 94bf255c1..960f8fdba 100644 --- a/app/utils/auth/auth_utils.py +++ b/app/utils/auth/auth_utils.py @@ -2,7 +2,7 @@ import jwt from fastapi import HTTPException, status -from jwt.exceptions import DecodeError, ExpiredSignatureError, InvalidTokenError +from jwt.exceptions import ExpiredSignatureError, InvalidTokenError from pydantic import ValidationError from sqlalchemy.ext.asyncio import AsyncSession @@ -49,14 +49,6 @@ def get_token_data( status_code=status.HTTP_403_FORBIDDEN, detail="Token has expired", ) from error - except DecodeError as error: - hyperion_access_logger.exception( - f"Get_token_data: Failed to decode a token ({request_id})", - ) - raise HTTPException( - status_code=status.HTTP_403_FORBIDDEN, - detail="Could not validate credentials", - ) from error return token_data