MCPcopy
hub / github.com/encode/httpx / HTTPStatusError

Class HTTPStatusError

httpx/_exceptions.py:258–268  ·  view source on GitHub ↗

The response had an error HTTP status of 4xx or 5xx. May be raised when calling `response.raise_for_status()`

Source from the content-addressed store, hash-verified

256
257
258class HTTPStatusError(HTTPError):
259 """
260 The response had an error HTTP status of 4xx or 5xx.
261
262 May be raised when calling `response.raise_for_status()`
263 """
264
265 def __init__(self, message: str, *, request: Request, response: Response) -> None:
266 super().__init__(message)
267 self.request = request
268 self.response = response
269
270
271class InvalidURL(Exception):

Callers 1

raise_for_statusMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected