Skip to main content

LiumRentOutcomeUnknownError

from lium.sdk import LiumRentOutcomeUnknownError

Defined in lium.sdk.exceptions.

A rent (up()) was posted and its outcome could not be established: the first request got no answer (a timeout, a dropped connection, a 5xx), no new pod was listed yet, and the repeat was refused or failed too. The server may still be completing the first request, so a pod may exist and bill: check ps() before renting again. idempotency_key is the key both requests carried.

LiumRentOutcomeUnknownError(
message: str,
*,
idempotency_key: str | None = None,
pod_name: str | None = None,
executor_id: str | None = None,
candidates: list[str] | None = None,
endpoint: str | None = None,
payload: dict | None = None,
code: str | None = None,
hint: str | None = None,
request_id: str | None = None
)

Catching it​

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

from lium.sdk import LiumRentOutcomeUnknownError

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

Attributes​

NameTypeDescription
idempotency_key
pod_name
executor_id
candidates
endpoint
payload