---
title: LiumSessionError
sidebar_label: LiumSessionError
sidebar_position: 14
---

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

# LiumSessionError

```python
from lium.sdk import LiumSessionError
```

Defined in `lium.sdk.exceptions`.

A browser session (``lium workspaces login`` / LIUM_SESSION_TOKEN) is missing or refused.

An API key cannot fix this, so the CLI's hint must not point at one.

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

## Catching it

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

```python
from lium.sdk import LiumSessionError

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