Skip to content

Commit

Permalink
chore: update exception handling
Browse files Browse the repository at this point in the history
  • Loading branch information
KreativeThinker committed Sep 5, 2024
1 parent b8698f7 commit 2747143
Showing 1 changed file with 0 additions and 6 deletions.
6 changes: 0 additions & 6 deletions src/pwncore/routes/auth.py
Original file line number Diff line number Diff line change
Expand Up @@ -117,12 +117,6 @@ def get_jwt(*, authorization: t.Annotated[str, Header()]) -> JwtInfo:
decoded_token: JwtInfo = jwt.decode(
token, config.jwt_secret, algorithms=["HS256"]
)
except (
jwt.exceptions.DecodeError
) as err: # Will filter for invalid signature/expired tokens
logger.warning("Decode error", exc_info=err)
raise HTTPException(status_code=401)

except jwt.exceptions.InvalidTokenError as err:
logger.warning("Invalid token", exc_info=err)
raise HTTPException(status_code=401)
Expand Down

0 comments on commit 2747143

Please sign in to comment.