From da53cb26fc3cbc2f38b210b0b6c4078b90670ebe Mon Sep 17 00:00:00 2001 From: Niklas Nielsen Date: Tue, 30 Jan 2024 14:28:04 -0800 Subject: [PATCH] Reintroduce raising in method, since we suppress call site --- log10/load.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/log10/load.py b/log10/load.py index 593cf600..74eeaa81 100644 --- a/log10/load.py +++ b/log10/load.py @@ -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: