This commit is contained in:
Timothy Jaeryang Baek committed 2026-02-13 17:38:57 -06:00
1 parent 3b61562c82
commit d33ad462aa
2 files changed
+9 -3

No files matched your search

+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()