Bases: Exception
Exception raised when attempting to create a vector store collection that already exists.
Attributes: |
-
collection_name
–
Name of the existing collection.
-
message
–
Explanation of the error.
|
Source code in src/common/exceptions.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17 | class CollectionExistsException(Exception):
"""Exception raised when attempting to create a vector store collection that already exists.
Attributes:
collection_name: Name of the existing collection.
message: Explanation of the error.
"""
def __init__(self, collection_name: str) -> None:
"""Initialize the exception.
Args:
collection_name: Name of the collection that already exists.
"""
self.collection_name = collection_name
self.message = f"Collection with name {collection_name} already exists"
super().__init__(self.message)
|
__init__(collection_name)
Initialize the exception.
Parameters: |
-
collection_name
(str )
–
Name of the collection that already exists.
|
Source code in src/common/exceptions.py
9
10
11
12
13
14
15
16
17 | def __init__(self, collection_name: str) -> None:
"""Initialize the exception.
Args:
collection_name: Name of the collection that already exists.
"""
self.collection_name = collection_name
self.message = f"Collection with name {collection_name} already exists"
super().__init__(self.message)
|