Error Types
HTTP Errors
API failures raiserequests.exceptions.HTTPError with the status code and server error message.
Validation Errors
Invalid inputs raiseValueError:
- Empty required fields (
dql,agent_run_ids, etc.) - Invalid parameter values (
limit <= 0, unsupportedpermissionvalues) - Missing API key at initialization
Schema Validation Errors
Invalid JSON schemas raisejsonschema.ValidationError:
Job Failures
When usingadd_agent_runs(wait=True), failed background jobs raise RuntimeError. The
exception message is the server-provided error_message from the job status when available,
and falls back to "Job was canceled" otherwise:
Retry Behavior
The SDK automatically retries on server errors (5xx) for agent run uploads (add_agent_runs),
with exponential backoff (up to 3 retries by default). Client errors (4xx) are not retried.
Other methods do not retry automatically.

