Skip to content

Commit

Permalink
more explicit exception
Browse files Browse the repository at this point in the history
  • Loading branch information
lferran committed Nov 24, 2023
1 parent a71fe77 commit 9875755
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion nucliadb/nucliadb/search/predict.py
Original file line number Diff line number Diff line change
Expand Up @@ -315,7 +315,7 @@ async def check_response(

try:
detail = await resp.json()
except Exception:
except json.decoder.JSONDecodeError:
detail = await resp.text()
logger.error(f"Predict API error at {resp.url}: {detail}")
raise ProxiedPredictAPIError(status=resp.status, detail=detail)
Expand Down

0 comments on commit 9875755

Please sign in to comment.