## ApiError


An [ApiClient](ApiClient.md#dazapiz.ApiClient) request ended in a non-2xx response, after any retries.


Usage

``` python
ApiError()
```


Also an `httpx.HTTPStatusError`, so code written for `httpx` catches it. The message carries the method, URL, status and response body, never a request header. `request` and `response` are the `httpx` objects.


## Examples

``` python
try:
    client.fetch("/items/{item_id}", item_id="42")
except ApiError as err:
    if err.response.status_code != 404:
        raise
```
