Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions deploy/docker/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -816,6 +816,10 @@ async def handle_crawl_request(
# Per-crawl wall-clock deadline exceeded.
raise HTTPException(status_code=504, detail="Crawl exceeded the time limit")

except TimeoutError as e:
# wait_for selector / JS condition timed out — client error, not server.
raise HTTPException(status_code=408, detail=str(e))

except HTTPException:
# Deliberate status (e.g. 400 SSRF "URL blocked") must pass through
# rather than be genericized to 500 by the handler below.
Expand Down