Skip to content
masterclass Buddy

HTTPX · Error

HTTPStatusError

HTTPStatusError is raised by response.raise_for_status() when an HTTP response has a 4xx or 5xx status. The exception includes the request and response objects.

Last updated

Syntax

class httpx.HTTPStatusError(message, *, request, response)

In-depth API docs are only for subscribers: parameters, examples, common mistakes and interview practice.

Subscribe
  • HTTPError
  • RequestError
  • Response.raise_for_status
  • httpx.get

Source: Exceptions - HTTPX. Checked 2026-11-03.