Dump an error code on non-200 statusg

This commit is contained in:
Cyber MacGeddon 2024-12-06 15:15:24 +00:00
parent 142a2e4437
commit 30138cc61d

View file

@ -19,6 +19,9 @@ resp = requests.post(
json=input,
)
if resp.status_code != 200:
raise RuntimeError(f"Status code: {resp.status_code}")
resp = resp.json()
if "error" in resp: