Skip to main content
This is the parent class of ApiError (and so of NotFound and Conflict). It is also raised directly when an API response body is not valid JSON (message starting Invalid JSON response).
Catching HttpError does not catch every failed request: HTTP 405 is raised as Unsupported, an error response without a structured body is re-raised as requests.HTTPError, and a request the client gave up retrying ends in a plain BaseError.

Examples

Catching Fiddler API errors and invalid JSON responses: