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.