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. Everyfetch / 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 todeleteit).
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 getSessionDisconnectedError. 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:
HTTP status returned by the API.
HTTP method used (
"GET", "POST", …).Path that was called, e.g.
"/pipeline/<id>/run".Best-effort parsed message from the response body — checks
error, message, detail, errors in order.Original response body. Useful when
error_message doesn’t surface what you need.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.
