# 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.
