chore: standardize vector store not found error (#2968)

# What does this PR do?
1. Creates a new `VectorStoreNotFoundError` class
2. Implements the new class where appropriate 

Relates to #2379

Signed-off-by: Nathan Weinberg <nweinber@redhat.com>
This commit is contained in:
Nathan Weinberg 2025-07-30 18:19:16 -04:00 committed by GitHub
parent 272a3e9937
commit cd5c6a2fcd
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
9 changed files with 46 additions and 31 deletions

View file

@ -26,6 +26,14 @@ class ModelNotFoundError(ValueError):
super().__init__(message)
class VectorStoreNotFoundError(ValueError):
"""raised when Llama Stack cannot find a referenced vector store"""
def __init__(self, vector_store_name: str) -> None:
message = f"Vector store '{vector_store_name}' not found. Use client.vector_dbs.list() to list available vector stores."
super().__init__(message)
class DatasetNotFoundError(ValueError):
"""raised when Llama Stack cannot find a referenced dataset"""