| Error transport | gRPC status codes |
| SDK exceptions | actian_vectorai.exceptions module |
| SDK version | All versions |
gRPC status codes
VectorAI DB returns the following gRPC status codes.| Status code | Numeric | Meaning |
|---|---|---|
OK | 0 | Success |
INVALID_ARGUMENT | 3 | Bad request — malformed input or wrong parameter type |
NOT_FOUND | 5 | Collection or point does not exist |
ALREADY_EXISTS | 6 | Collection with this name already exists |
RESOURCE_EXHAUSTED | 8 | Server at capacity — too many connections or requests |
FAILED_PRECONDITION | 9 | Operation not permitted in current state |
ABORTED | 10 | Concurrent modification conflict |
UNIMPLEMENTED | 12 | Operation not supported by this server edition |
INTERNAL | 13 | Unexpected server-side error |
UNAVAILABLE | 14 | Server not reachable or not yet ready |
UNAUTHENTICATED | 16 | Missing or invalid API key |
Python SDK exceptions
The Python SDK raises typed exceptions that wrap the underlying gRPC status codes. All exceptions inherit fromVectorAIError, which you can use as a catch-all.
| Exception class | gRPC code | When raised |
|---|---|---|
VectorAIInvalidArgumentError | INVALID_ARGUMENT | Wrong input type or malformed request |
VectorAINotFoundError | NOT_FOUND | Collection or point does not exist |
VectorAIAlreadyExistsError | ALREADY_EXISTS | Creating a collection that already exists |
VectorAIResourceExhaustedError | RESOURCE_EXHAUSTED | Server capacity limit reached |
VectorAIUnavailableError | UNAVAILABLE | Cannot connect to the server |
VectorAIUnauthenticatedError | UNAUTHENTICATED | Invalid or missing API key |
VectorAIInternalError | INTERNAL | Unexpected server error |
VectorAIError | Any | Base class for all SDK errors |
Handle errors in application code
The following patterns show you how to catch and respond to specific exception types.Catch specific exceptions
Use a try/except block to catch specific exceptions and handle each error type appropriately.Create a collection idempotently
CatchVectorAIAlreadyExistsError to skip creation when the collection already exists.
Retry on transient errors
Use exponential backoff forUNAVAILABLE and RESOURCE_EXHAUSTED errors, which are often transient.
Inspect error details
Every SDK exception exposes the underlying gRPC status code and a human-readable message. Use these fields to log errors or build custom handling logic.Common error messages
Expand each section for details about what causes each error and how to resolve it.Collection not found
Collection not found
Code:
NOT_FOUNDMessage: collection 'my-collection' does not existCause: The collection name is misspelled, or the collection was deleted.Fix: Call client.list_collections() to verify the collection exists before operating on it.Wrong vector dimensions
Wrong vector dimensions
Code:
INVALID_ARGUMENTMessage: vector size mismatch: expected 1536, got 768Cause: The query vector or inserted vector has a different number of dimensions than the collection’s configuration.Fix: Confirm the embedding model and collection dimensions match.Authentication failure
Authentication failure
Code:
UNAUTHENTICATEDMessage: invalid or missing API keyCause: The server has API key auth enabled but the client did not supply a key, or supplied the wrong key.Fix: Pass api_key to VectorAIClient.Server internal error
Server internal error
Code:
INTERNALMessage: internal server errorCause: Unexpected condition on the server side, typically a bug or disk/memory exhaustion.Fix: Check server logs for details. If the error persists, then contact Actian support.Next steps
Explore these related guides to learn more.Troubleshooting
Diagnose connection, search, and startup issues.
Best practices
Recommended error handling patterns for production applications.
Python SDK
Full SDK reference including the exceptions module.
Configuration
Configure timeouts and connection limits to reduce transient errors.