VectoriaError and ship with machine-readable code values so you can branch on them.
Error Types
Importing Error Classes
Error Handling Patterns
Catch Specific Errors
Catch by Error Code
Batch Operations with Error Recovery
Graceful Degradation
Monitoring and Health
UsegetStats() to feed dashboards or health endpoints:
toolIndex.size(), toolIndex.clear(), and toolIndex.clearStorage() to expose maintenance commands or admin tooling.
Best Practices
- Always catch specific errors instead of generic
Error - Use error codes for programmatic handling
- Access error properties (
documentId,context, etc.) for debugging - Implement retry logic for
VectoriaNotInitializedError - Log validation errors with context for debugging
- Graceful fallbacks for production resilience
Related
Overview
Getting started
Indexing
Adding documents
Search
Querying the index