Skip to main content
The SDK throws typed errors. Catch the parent class to handle anything, or catch a specific subclass for fine-grained logic.
In PHP the exception hierarchy is rooted at \Hawkings\Exception\ApiError, with subclasses for each error type (AuthenticationError, PermissionError, NotFoundError, InvalidRequestError, RateLimitError, IdempotencyError, NetworkError). Catch ApiError to handle anything.

Error taxonomy

Automatic retries

The SDK retries 429 and 5xx responses automatically with exponential backoff and jitter. Defaults:
Disable for a specific call:

Idempotency keys

Any create*, update*, or AI generation call can carry an Idempotency-Key. Same key + same body = same response, even if you call it 100 times. Different body with the same key throws IdempotencyError.
Idempotency records live for 24 hours.

Error envelope

Every error response carries a structured body:
When opening a support ticket, attach request_id — it’s all we need to trace a request end-to-end.