Skip to main content
python3 - request.py
>>> import httpx
>>> response = httpx.get("https://scriptr.dev/_not-found")
>>> response.raise_for_status()
Traceback (most recent call last):
File "/app/routes/page.py", line 42, in get_page
response.raise_for_status()
File "httpx/_models.py", line 763, in raise_for_status
raise HTTPStatusError(message, request=request, response=self)
httpx.HTTPStatusError: Client error '404 Not Found' for url 'https://scriptr.dev/_not-found'
!
HTTPStatusError: 404
The requested resource could not be found on this server.
# debugging tip: did you mean...?
# - / (path prefix - best match)
# - /about (popular route)
# - /blog (popular route)

response.status_code == 404