Skip to content

Commit

Permalink
Handle JSON-free error responses properly.
Browse files Browse the repository at this point in the history
  • Loading branch information
ktlim committed Jun 20, 2024
1 parent 263c6c0 commit 4320969
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion python/lsst/summit/utils/consdbClient.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,10 @@ def _check_status(r: requests.Response) -> None:
try:
r.raise_for_status()
except requests.HTTPError as e:
e.add_note(str(e.response.json()))
try:
e.add_note(str(e.response.json()))
except requests.JSONDecodeError:
pass
raise e


Expand Down

0 comments on commit 4320969

Please sign in to comment.