fix: replace ValueError/TypeError with InvalidArgumentError in API layer#6832
Conversation
Replaces user-facing validation errors with ChromaDB's own InvalidArgumentError for consistent error handling across the API. Files changed: - chromadb/api/types.py: 95 ValueError + 2 TypeError → InvalidArgumentError - chromadb/api/client.py: 5 ValueError → InvalidArgumentError - chromadb/api/async_client.py: 3 ValueError → InvalidArgumentError Closes chroma-core#3026
Reviewer ChecklistPlease leverage this checklist to ensure your code review is thorough before approving Testing, Bugs, Errors, Logs, Documentation
System Compatibility
Quality
|
|
Standardize API Argument Validation Errors to This PR replaces user-facing The update appears mechanical and behavior-preserving in terms of validation logic and error messages, while changing the exception class surfaced to callers. This improves error handling consistency for SDK and API consumers that rely on Chroma-specific error types. This summary was automatically generated by @propel-code-bot |
Replaces 103 user-facing ValueError/TypeError with InvalidArgumentError in the API layer (types.py, client.py, async_client.py) for consistent error handling.