api/e621: narrow JSON parse except to ValueError

This commit is contained in:
pax 2026-04-17 20:15:45 -05:00
parent 7c4215c5d7
commit cd688be893

View File

@ -92,7 +92,7 @@ class E621Client(BooruClient):
resp.raise_for_status()
try:
data = resp.json()
except Exception as e:
except ValueError as e:
log.warning("e621 search JSON parse failed: %s: %s — body: %s",
type(e).__name__, e, resp.text[:200])
return []