mirror of
https://github.com/trustgraph-ai/trustgraph.git
synced 2026-07-16 16:51:02 +02:00
Dump an error code on non-200 statusg
This commit is contained in:
parent
142a2e4437
commit
30138cc61d
1 changed files with 3 additions and 0 deletions
|
|
@ -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:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue