---
title: LiumGpuOperationError
sidebar_label: LiumGpuOperationError
sidebar_position: 17
---

> ## 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.
>
> Lium (lium.io) is a GPU rental marketplace: rent NVIDIA GPUs by the hour, billed per second.

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

# LiumGpuOperationError

```python
from lium.sdk import LiumGpuOperationError
```

Defined in `lium.sdk.exceptions`.

A GPU reset or clock change ran on the node and failed (a reset's status ``failed``, or a
409, that lists ``gpus``).

Inspect ``gpus`` and ``container_restarted``: the container can fail to restart even when every GPU reset succeeds.

``gpus`` is each GPU's outcome ([`GpuResetOutcome`](/developers/sdk/reference/models/gpu-reset-outcome) from [`reset_gpu()`](/developers/sdk/reference/client/lium#reset_gpu), [`GpuClockOutcome`](/developers/sdk/reference/models/gpu-clock-outcome)
from [`lock_gpu_clocks()`](/developers/sdk/reference/client/lium#lock_gpu_clocks) / [`reset_gpu_clocks()`](/developers/sdk/reference/client/lium#reset_gpu_clocks)), so the caller sees which GPUs failed and
which stay locked; ``container_restarted`` says whether a reset started the pod's container again (``None``
when the server did not say, always for clocks). ``code`` is the API's (``reset_not_supported``, ...).

```python
LiumGpuOperationError(
    message: str,
    *,
    gpus: list[lium.sdk.models.GpuResetOutcome | lium.sdk.models.GpuClockOutcome] | None = None,
    container_restarted: bool | None = None,
    code: str | None = None,
    hint: str | None = None,
    request_id: str | None = None
)
```

## Catching it

`LiumGpuOperationError` subclasses [`LiumError`](/developers/sdk/reference/exceptions/lium-error) → `Exception`, so a handler for any of those also catches it.

```python
from lium.sdk import LiumGpuOperationError

try:
    ...  # any SDK call
except LiumGpuOperationError 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 |
