Skip to main content
Every exception raised by the SDK is a subclass of SpineError, so a single except SpineError: clause catches anything the SDK can throw.

Exception hierarchy

Inspecting errors

SpineAPIError carries the HTTP status, the server’s error message, the request id (useful when reporting issues), and the raw body:
See Errors for the full list of server-side error messages.

Automatic retries

The SDK retries transient failures automatically with exponential backoff: When the retry budget is exhausted, the underlying exception (ServerError, RateLimitError, SpineConnectionError) is raised.

Tuning the policy

Override the policy on the client:
Set max_retries=0 to disable retries entirely — useful in tests.

Timeouts

The HTTP timeout is 60 seconds total / 10 seconds to connect by default. Override it with an httpx.Timeout:
The polling timeout (handle.wait(timeout=...)) is independent and defaults to 15 minutes. Tune it per call:
SpineTimeoutError is raised when either timeout fires.