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:
Automatic retries
The SDK retries transient failures automatically with exponential backoff:| Failure | Retried? | Notes |
|---|---|---|
| Connection errors (DNS, refused, TLS) | Yes | Up to max_retries. |
| HTTP 429 | Yes | Honours Retry-After header. |
| HTTP 5xx | Yes | Up to max_retries. |
| HTTP 400 / 401 / 404 | No | Raised immediately. |
ServerError, RateLimitError, SpineConnectionError) is raised.
Tuning the policy
Override the policy on the client: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 anhttpx.Timeout:
handle.wait(timeout=...)) is independent and
defaults to 15 minutes. Tune it per call:
SpineTimeoutError is raised when either timeout fires.