LiumRateLimitError
from lium.sdk import LiumRateLimitError
Defined in lium.sdk.exceptions.
Rate limit exceeded. retry_after is the response's Retry-After in seconds, None when absent.
LiumRateLimitError(
message: str = '',
*,
code: str | None = None,
hint: str | None = None,
request_id: str | None = None
)
Catching it
LiumRateLimitError subclasses LiumError → Exception, so a handler for any of those also catches it.
from lium.sdk import LiumRateLimitError
try:
... # any SDK call
except LiumRateLimitError 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 |
|---|---|---|
retry_after | float | None |