Skip to content
This repository has been archived by the owner on Dec 9, 2024. It is now read-only.

Log traceback when exception is raised #999

Conversation

oliverjwroberts
Copy link
Contributor

Description of change

#987 added exception logging to some functions, however, it was deemed more useful to also log the traceback when an exception occurs.

This PR adds such functionality. It also fixes a bug introduced in the aforementioned PR, that references the variable response in an except block, where it is out of scope.

Test instructions

You should now see the traceback logged when an exception occurs during the sending of requests to Data Hub.

@oliverjwroberts oliverjwroberts self-assigned this Jul 29, 2024
@oliverjwroberts oliverjwroberts requested a review from a team as a code owner July 29, 2024 16:05
Copy link

codecov bot commented Jul 29, 2024

Codecov Report

Attention: Patch coverage is 0% with 3 lines in your changes missing coverage. Please review.

Project coverage is 68.68%. Comparing base (0d95a15) to head (9c5e372).

Files Patch % Lines
app/enquiries/common/datahub_utils.py 0.00% 3 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##             main     #999   +/-   ##
=======================================
  Coverage   68.68%   68.68%           
=======================================
  Files          61       61           
  Lines        2034     2034           
=======================================
  Hits         1397     1397           
  Misses        637      637           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@oliverjwroberts oliverjwroberts merged commit b4757ef into main Jul 30, 2024
3 of 4 checks passed
@oliverjwroberts oliverjwroberts deleted the hotfix/CPS-600-fix-exception-logging-during-requests-to-data-hub branch July 30, 2024 06:12
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants