POMA SDK Exceptions Reference
python
from poma import (
ApiError,
InvalidGrillApiKeyError,
InvalidInputError,
InvalidResponseError,
PomaSDKError,
)PomaSDKError
Base class for SDK-specific exceptions.
ApiError
Raised when the API returns an HTTP or job-level error.
Attributes:
| Attribute | Type |
|---|---|
status_code | `int |
response_body | str |
job_id | `str |
file_path | `str |
url | `str |
InvalidInputError
Raised when an SDK method receives invalid or missing input.
InvalidResponseError
Raised when the server returns an unexpected, empty, or non-JSON response.
InvalidGrillApiKeyError
Raised by Grill() / AsyncGrill() at construction time when the resolved API key is missing, looks like an account-level key (poma_acc_…), or has any prefix other than the expected Grill project prefix (poma_prod_gr_…).
Validation happens locally, before any HTTP request — so a misconfiguration fails fast on your machine rather than as a 401/403 from the server. Fix by setting POMA_GRILL_API_KEY to a project key from POST /projects.
See Grill authentication for the provisioning flow.