Every SDK error subclassesDocumentation Index
Fetch the complete documentation index at: https://docs.vectorshift.ai/llms.txt
Use this file to discover all available pages before exploring further.
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
| Status | Exception | Likely cause | Fix |
|---|---|---|---|
| 400 | BadRequestError | Malformed request body (e.g. unsupported input_type) | Check the call arguments against the reference. |
| 401 | AuthenticationError | VECTORSHIFT_API_KEY missing, expired, or revoked | Generate a new key at Account → API Keys. |
| 403 | PermissionDeniedError | Key valid, but lacks scope for the org or object | Use a key from the org that owns the object, or ask an admin to grant access. |
| 404 | NotFoundError | Object id / name doesn’t exist | Verify the id in the platform, or fetch by name= instead. |
| 422 | UnprocessableEntityError | Server rejected the payload semantically (e.g. invalid node wiring) | e.error_message carries the server’s reason. Enabling the mypy plugin catches most of these at edit time. |
| 429 | RateLimitError | You’re hitting rate limits | Back off and retry with jitter. |
| 500+ | InternalServerError | Server-side issue | Retry once. If it persists, contact support. |
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.
