> For the complete documentation index, see [llms.txt](https://docs.earthscale.ai/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.earthscale.ai/python-api/python-api-reference/exceptions.md).

# Exceptions

## EarthscaleClientError <a href="#earthscale.earthscaleclienterror" id="earthscale.earthscaleclienterror"></a>

Base exception for Earthscale client errors.

This is the base class for all exceptions raised by the Earthscale client. All other client exceptions inherit from this class.

### \_\_init\_\_ <a href="#earthscale.earthscaleclienterror.__init" id="earthscale.earthscaleclienterror.__init"></a>

```python
__init__(
    message: str,
    error_class: str | None = None
)
```

## VersionIncompatibleError <a href="#earthscale.versionincompatibleerror" id="earthscale.versionincompatibleerror"></a>

Raised when the client version is incompatible with the server.

This exception is raised when the client’s API version is not supported by the server, indicating that the client needs to be updated.

## NotFoundError <a href="#earthscale.notfounderror" id="earthscale.notfounderror"></a>

Raised when a resource is not found.

This exception is raised when the client requests a resource that does not exist, such as a dataset with a non-existent ID.

## ValidationFailedError <a href="#earthscale.validationfailederror" id="earthscale.validationfailederror"></a>

Raised when validation fails.

This exception is raised when the client or server validation fails, such as when invalid parameters are provided to an API endpoint.

## AuthenticationError <a href="#earthscale.authenticationerror" id="earthscale.authenticationerror"></a>

Raised when authentication fails.

This exception is raised when the client cannot authenticate with the Earthscale API, such as when invalid credentials are provided or when the refresh token has expired.

## TokenRefreshRequired <a href="#earthscale.tokenrefreshrequired" id="earthscale.tokenrefreshrequired"></a>

Raised when a token refresh is required.

This exception is raised when the authentication token has expired and needs to be refreshed before making further API requests.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.earthscale.ai/python-api/python-api-reference/exceptions.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
