Skip to main content
Voyage and inference exceptions derive from 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.
SailError
├─ VoyageError
│  └─ VoyageHTTPError
│     └─ VoyageNotFoundError
├─ InferenceError
│  └─ InferenceHTTPError
import sail

try:
    sail.voyage.complete(message="done")
    sail.voyage.flush()  # raise-on-failure delivery confirmation
except sail.VoyageNotFoundError:
    ...  # the Voyage no longer exists for this API key
except sail.VoyageError as exc:
    ...  # any other Voyage delivery failure

VoyageError

Base class for Voyage SDK errors (e.g. timed-out flush, buffer-full while preserving a terminal event). Subclass of SailError.

VoyageHTTPError

Raised when the Voyage API returns an HTTP error. Subclass of VoyageError.
AttributeTypeDescription
status_codeintHTTP status code.
responsedict | NoneParsed error response body.

VoyageNotFoundError

Raised when a Voyage cannot be found for the current API key (HTTP 404). Subclass of VoyageHTTPError, so it carries status_code and response.

InferenceError

Base class for inference wrapper errors. Raised, for example, when stream=True is passed (the Sail inference API does not support streaming) or when no API key is configured. Subclass of SailError.

InferenceHTTPError

Raised when a Sail inference endpoint returns a non-2xx response. Subclass of InferenceError.
AttributeTypeDescription
status_codeintHTTP status code.
responsedict | NoneParsed error response body.