Buckets:
AnonymousSpottedToad/candidate_bucket / codebase /python /topoteretes_cognee /cognee /modules /graph /exceptions /exceptions.py
| from cognee.exceptions import CogneeValidationError | |
| from fastapi import status | |
| class EntityNotFoundError(CogneeValidationError): | |
| """Database returns nothing""" | |
| def __init__( | |
| self, | |
| message: str = "The requested entity does not exist.", | |
| name: str = "EntityNotFoundError", | |
| status_code=status.HTTP_404_NOT_FOUND, | |
| ): | |
| super().__init__(message, name, status_code) | |
| class EntityAlreadyExistsError(CogneeValidationError): | |
| """Conflict detected, like trying to create a resource that already exists""" | |
| def __init__( | |
| self, | |
| message: str = "The entity already exists.", | |
| name: str = "EntityAlreadyExistsError", | |
| status_code=status.HTTP_409_CONFLICT, | |
| ): | |
| super().__init__(message, name, status_code) | |
| class InvalidDimensionsError(CogneeValidationError): | |
| def __init__( | |
| self, | |
| name: str = "InvalidDimensionsError", | |
| status_code: int = status.HTTP_400_BAD_REQUEST, | |
| ): | |
| message = "Dimensions must be positive integers." | |
| super().__init__(message, name, status_code) | |
| class DimensionOutOfRangeError(CogneeValidationError): | |
| def __init__( | |
| self, | |
| dimension: int, | |
| max_index: int, | |
| name: str = "DimensionOutOfRangeError", | |
| status_code: int = status.HTTP_400_BAD_REQUEST, | |
| ): | |
| message = f"Dimension {dimension} is out of range. Valid range is 0 to {max_index}." | |
| super().__init__(message, name, status_code) | |
Xet Storage Details
- Size:
- 1.49 kB
- Xet hash:
- 6c1f540fc5e0e65d653cdba4f8395ae34e4c1451460ba6960010f2f701423199
·
Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.