sail.SailError, the base for
every SDK error. flush() raises these on delivery failure; complete() and
fail() warn instead of raising (the terminal event stays buffered for
retry); event() never raises network errors.
flush() bounds each batch
send (60s) even when called without a timeout. A wedged connection
surfaces as one of the errors below rather than blocking forever.
Recommended lifecycle
Most agents should usewith sail.voyage.run(...):. It emits
voyage.completed on a clean exit, emits voyage.failed and re-raises on an
exception, and performs the same bounded best-effort terminal delivery as the
manual helpers.
Use create() / complete() / fail() only when your controller’s start and
terminal sites are separated, or when you need strict raise-on-failure
confirmation of the terminal lifecycle event. Call flush() after the terminal
helper so voyage.completed or voyage.failed is already in the delivery
buffer:
VoyageError
Base class for Voyage SDK delivery errors, such as a flush that times out or cannot deliver a required terminal event. Subclass ofSailError.
VoyageHTTPError
Raised when the Voyage API returns an HTTP error. Subclass ofVoyageError.
| Attribute | Type | Description |
|---|---|---|
status_code | int | HTTP status code. |
response | dict | None | Parsed error response body. |
VoyageNotFoundError
Raised when a Voyage cannot be found for the current API key (HTTP 404). Subclass ofVoyageHTTPError, so it carries status_code and response.
InferenceError
Base class for inference wrapper errors. Raised, for example, when an unsupported wrapper option such asstream=True is passed, or
when no API key is configured. Subclass of SailError.
InferenceHTTPError
Raised when a Sail inference endpoint returns a non-2xx response. Subclass ofInferenceError.
| Attribute | Type | Description |
|---|---|---|
status_code | int | HTTP status code. |
response | dict | None | Parsed error response body. |