diff --git a/jobs/payment-jobs/poetry.lock b/jobs/payment-jobs/poetry.lock index 19abb1e0d..d53cc8fbd 100644 --- a/jobs/payment-jobs/poetry.lock +++ b/jobs/payment-jobs/poetry.lock @@ -2022,8 +2022,8 @@ werkzeug = "3.0.3" [package.source] type = "git" url = "https://github.com/seeker25/sbc-pay.git" -reference = "fix_logging_404_etc" -resolved_reference = "00f031f8270551ee16860e3cb5813c5a8ef981c8" +reference = "logging_changes_part3" +resolved_reference = "5a6494656564bba0154aed41288ecd751f16d0c2" subdirectory = "pay-api" [[package]] @@ -3174,4 +3174,4 @@ multidict = ">=4.0" [metadata] lock-version = "2.0" python-versions = "^3.12" -content-hash = "ce6c9aa5860c030e6a0317c09817fe72ed08b369796420615fa200ac813536a4" +content-hash = "c6c86abce08f1407ab8893fb5b853e62114733dd0dbbfc42ff48348dde5be418" diff --git a/jobs/payment-jobs/pyproject.toml b/jobs/payment-jobs/pyproject.toml index dd6eb718d..19ee49858 100644 --- a/jobs/payment-jobs/pyproject.toml +++ b/jobs/payment-jobs/pyproject.toml @@ -7,7 +7,7 @@ readme = "README.md" [tool.poetry.dependencies] python = "^3.12" -pay-api = {git = "https://github.com/seeker25/sbc-pay.git", branch = "fix_logging_404_etc", subdirectory = "pay-api"} +pay-api = {git = "https://github.com/seeker25/sbc-pay.git", branch = "logging_changes_part3", subdirectory = "pay-api"} flask = "^3.0.2" flask-sqlalchemy = "^3.1.1" sqlalchemy = "^2.0.28" diff --git a/pay-api/src/pay_api/services/oauth_service.py b/pay-api/src/pay_api/services/oauth_service.py index 5282bef11..5e94e308a 100644 --- a/pay-api/src/pay_api/services/oauth_service.py +++ b/pay-api/src/pay_api/services/oauth_service.py @@ -74,7 +74,7 @@ def post(endpoint, token, auth_header_type: AuthHeaderType, # pylint: disable=t raise ServiceUnavailableException(exc) from exc except HTTPError as exc: current_app.logger.error( - f"HTTPError on POST with status code {exc.response.status_code if exc.response else ''}") + f"HTTPError on POST with status code {exc.response.status_code if exc.response is not None else ''}") if exc.response and exc.response.status_code >= 500: raise ServiceUnavailableException(exc) from exc raise exc @@ -123,9 +123,9 @@ def get(endpoint, token, auth_header_type: AuthHeaderType, # pylint:disable=too current_app.logger.error(exc) raise ServiceUnavailableException(exc) from exc except HTTPError as exc: - if not exc.response or exc.response.status_code != 404: + if exc.response is None or exc.response.status_code != 404: current_app.logger.error('HTTPError on GET with status code ' - f"{exc.response.status_code if exc.response else ''}") + f"{exc.response.status_code if exc.response is not None else ''}") if exc.response is not None: if exc.response.status_code >= 500: raise ServiceUnavailableException(exc) from exc