> ## Documentation Index
> Fetch the complete documentation index at: https://docs.fiddler.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# ApiError

> Raised when an API request fails with a structured error response.

This exception is raised when the Fiddler API returns an error response
that can be parsed into a structured error format. It provides access to
the detailed error information returned by the server.

## Attributes

**status\_code**

HTTP status code of the failed request (optional)

**reason**

Specific reason from the API response (optional)

**error\_response**

Full structured error response object (optional)

## Example

```python theme={null}
from fiddler_evals import Project
from fiddler_evals.exceptions import ApiError

try:
    project = Project.get_by_name(name="my-project")
except ApiError as e:
    print(f"{e.status_code} {e.reason}: {e.message}")
```

## Parameters

**message** `str | None` (default: None)

Error message from the API

**status\_code** `int | None` (default: None)

HTTP status code of the failed request

**reason** `str | None` (default: None)

Specific reason from the API response

**error\_response** `ErrorResponse | None` (default: None)

Full structured error response object
