From 30138cc61d93cf7136f6843deeb248a6e4a0c5ab Mon Sep 17 00:00:00 2001 From: Cyber MacGeddon Date: Fri, 6 Dec 2024 15:15:24 +0000 Subject: [PATCH] Dump an error code on non-200 statusg --- test-api/test-llm-api | 3 +++ 1 file changed, 3 insertions(+) diff --git a/test-api/test-llm-api b/test-api/test-llm-api index c33c6634..6bee2048 100755 --- a/test-api/test-llm-api +++ b/test-api/test-llm-api @@ -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: