This commit is contained in:
Timothy Jaeryang Baek
2026-02-13 17:38:57 -06:00
parent 3b61562c82
commit d33ad462aa
2 changed files with 9 additions and 3 deletions
+6 -3
View File
@@ -604,9 +604,12 @@ async def get_models(
if r.status != 200:
# Extract response error details if available
error_detail = f"HTTP Error: {r.status}"
res = await r.json()
if "error" in res:
error_detail = f"External Error: {res['error']}"
try:
res = await r.json()
if "error" in res:
error_detail = f"External Error: {res['error']}"
except Exception:
pass
raise Exception(error_detail)
response_data = await r.json()