MCPcopy Create free account
hub / github.com/apify/crawlee-python / is_status_code_client_error

Function is_status_code_client_error

src/crawlee/_utils/web.py:6–8  ·  view source on GitHub ↗

Return `True` for 4xx status codes, `False` otherwise.

(value: int)

Source from the content-addressed store, hash-verified

4
5
6def is_status_code_client_error(value: int) -> bool:
7 """Return `True` for 4xx status codes, `False` otherwise."""
8 return HTTPStatus.BAD_REQUEST <= value < HTTPStatus.INTERNAL_SERVER_ERROR
9
10
11def is_status_code_server_error(value: int) -> bool:

Callers 2

loadMethod · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected