Skip to main content
Every SDK error subclasses VectorshiftError. API errors carry the HTTP status, the endpoint, and a parsed error message — enough to branch on and log cleanly.

Hierarchy

Accessing objects you don’t own

The API key carries the org context. Every fetch / list / run / delete call is scoped to the org and user behind that key — there is no client-side ownership check because the only enforcement point that matters is the server. What you’ll see when you try to touch something outside your scope:
  • NotFoundError (404) — by design, the API returns 404 for both “doesn’t exist” and “exists but you can’t see it”. This prevents leaking object ids across orgs. Most cross-org accesses surface as 404.
  • PermissionDeniedError (403) — your key is valid but the specific operation isn’t allowed (e.g. you have read access to an object but try to delete it).
The same rules apply transitively. If a Pipeline you run references a sub-pipeline, KnowledgeBase, or Agent belonging to a different org, the engine will fail the run with a PipelineRunFailedError whose run_error points at the un-resolvable reference.

Status code reference

Connection errors

ApiConnectionError covers anything that fails before getting an HTTP response — DNS, TLS, refused connections. Its subclass ApiTimeoutError is raised when the request times out.

Pipeline-run errors

PipelineRunFailedError is raised when a run completes with a failed status. The exception carries the failing task_id and the server’s run_error string.

Session errors

Conversational sessions communicate over a websocket. If the connection drops mid-stream, you get SessionDisconnectedError. Use the session as an async context manager — it cleans up on exit even when an error is raised.

Anatomy of VectorshiftApiError

Every API error exposes these attributes:
status_code
int
HTTP status returned by the API.
method
str
HTTP method used ("GET", "POST", …).
endpoint
str
Path that was called, e.g. "/pipeline/<id>/run".
error_message
str
Best-effort parsed message from the response body — checks error, message, detail, errors in order.
raw_response
str
Original response body. Useful when error_message doesn’t surface what you need.
The default str(e) formats all of these together, plus a hint for common statuses. Log it directly — no need to build your own message.

What’s next

Authentication

Configure and rotate your API key.

Support

File an issue or reach the team.