Exceptions¶
All exceptions inherit from AIMEError for easy catch-all handling.
from aime_loc import LOC, AIMEError, RateLimitError
try:
profile = loc.scan("model-id")
except RateLimitError as e:
print(f"Rate limited. Retry after {e.retry_after}s")
except AIMEError as e:
print(f"AIME error: {e}")
AIMEError
¶
Bases: Exception
Base exception for all AIME LOC errors.
RateLimitError
¶
Bases: AIMEError
Too many requests (HTTP 429).
Attributes:
| Name | Type | Description |
|---|---|---|
retry_after |
Seconds to wait before retrying, if provided by the server. |
QuotaExceededError
¶
Bases: AIMEError
Monthly scan quota exceeded (HTTP 402).
Upgrade your tier at https://aime-loc.com/pricing
ScanInProgressError
¶
Bases: AIMEError
A scan for this model is already running (HTTP 409).
Use the returned scan_id to poll for results.
ScanFailedError
¶
Bases: AIMEError
The scan job failed on the server (HTTP 500 or job failure).
Attributes:
| Name | Type | Description |
|---|---|---|
scan_id |
The failed scan's ID. |
|
reason |
Server-provided failure reason. |