Skip to main content

LiumAuthError

from lium.sdk import LiumAuthError

Defined in lium.sdk.exceptions.

Authentication error.

LiumAuthError(
message: str = '',
*,
code: str | None = None,
hint: str | None = None,
request_id: str | None = None
)

Catching it​

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

Catching LiumAuthError also catches LiumSessionError.

from lium.sdk import LiumAuthError

try:
... # any SDK call
except LiumAuthError as e:
print(e, e.code, e.hint, e.request_id)
FieldMeaning
codemachine-readable error code from the API, when it sent one
hintwhat to try next, when the API suggested something
request_idthe API request id; quote it when you contact support