Skip to content

Commit

Permalink
Reintroduce raising in method, since we suppress call site
Browse files Browse the repository at this point in the history
  • Loading branch information
nqn committed Jan 30, 2024
1 parent ac741ea commit da53cb2
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions log10/load.py
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,8 @@ def post_request(url: str, json_payload: dict = {}) -> requests.Response:
# todo: set timeout
res = requests.post(url, headers=headers, json=json_payload)
# raise_for_status() will raise an exception if the status is 4xx, 5xxx
res.raise_for_status()

logger.debug(f"HTTP request: POST {url} {res.status_code}\n{json.dumps(json_payload, indent=4)}")
return res
except requests.Timeout:
Expand Down

0 comments on commit da53cb2

Please sign in to comment.