---
title: LiumError
sidebar_label: LiumError
sidebar_position: 1
---

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

<!-- Generated by scripts/generate_sdk_reference.py. Do not edit directly. -->

# LiumError

```python
from lium.sdk import LiumError
```

Defined in `lium.sdk.exceptions`.

Base exception for Lium SDK.

``code``, ``hint`` and ``request_id`` come from the API's error envelope
(``error: \{code, message, hint, request_id\}``) and the ``X-Request-Id``
header; all three are ``None`` when the server did not send them.

```python
LiumError(
    message: str = '',
    *,
    code: str | None = None,
    hint: str | None = None,
    request_id: str | None = None
)
```

## Catching it

`LiumError` subclasses `Exception`, so a handler for any of those also catches it.

Catching `LiumError` also catches [`ClusterNotListedError`](/developers/sdk/reference/exceptions/cluster-not-listed-error), [`LiumAuthError`](/developers/sdk/reference/exceptions/lium-auth-error), [`LiumHostKeyError`](/developers/sdk/reference/exceptions/lium-host-key-error), [`LiumNotFoundError`](/developers/sdk/reference/exceptions/lium-not-found-error), [`LiumPermissionError`](/developers/sdk/reference/exceptions/lium-permission-error), [`LiumRateLimitError`](/developers/sdk/reference/exceptions/lium-rate-limit-error), [`LiumServerError`](/developers/sdk/reference/exceptions/lium-server-error), [`PodStartError`](/developers/sdk/reference/exceptions/pod-start-error), [`RemoteExecutionError`](/developers/sdk/reference/exceptions/remote-execution-error).

```python
from lium.sdk import LiumError

try:
    ...  # any SDK call
except LiumError as e:
    print(e, e.code, e.hint, e.request_id)
```

| Field | Meaning |
| --- | --- |
| `code` | machine-readable error code from the API, when it sent one |
| `hint` | what to try next, when the API suggested something |
| `request_id` | the API request id; quote it when you contact support |

## Attributes

| Name | Type | Description |
| --- | --- | --- |
| `code` |  |  |
| `hint` |  |  |
| `request_id` |  |  |
