diff --git a/SPRINTLOG.md b/SPRINTLOG.md index e5316de21..968b1645c 100644 --- a/SPRINTLOG.md +++ b/SPRINTLOG.md @@ -450,3 +450,7 @@ _Nothing merged during this sprint_ - Workflow: Bump GitHub checkout action to v4 ([#1556](https://github.com/ScilifelabDataCentre/dds_web/pull/1556)) - Workflow: CodeQL action version(s) bumped to v3 ([#1569](https://github.com/ScilifelabDataCentre/dds_web/pull/1569)) - Workflow: Setup-node, codecov and upload-sarif action versions bumped to v4, v4 and v3, respectively ([#1570](https://github.com/ScilifelabDataCentre/dds_web/pull/1570)) + +# 2024-11-04 - 2024-11-15 + +- Removed exception for invalid token to simplify logging and reduce unnecessary error entries ([#1572](https://github.com/ScilifelabDataCentre/dds_web/pull/1572)) diff --git a/dds_web/security/auth.py b/dds_web/security/auth.py index 3d00023a6..99fbd32c9 100644 --- a/dds_web/security/auth.py +++ b/dds_web/security/auth.py @@ -278,7 +278,7 @@ def __verify_general_token(token): # ValueError is raised when the token doesn't look right (for example no periods) # jwcryopto.common.JWException is the base exception raised by jwcrypto, # and is raised when the token is malformed or invalid. - flask.current_app.logger.exception(e) + flask.current_app.logger.warning(f"Error with Token operation: {type(e).__name__}") raise AuthenticationError(message="Invalid token") from e expiration_time = data.get("exp")