<!-- .github/pull_request_template.md --> ## Description <!-- Provide a clear description of the changes in this PR --> ## DCO Affirmation I affirm that all code in every commit of this pull request conforms to the terms of the Topoteretes Developer Certificate of Origin. --------- Co-authored-by: Daulet Amirkhanov <damirkhanov01@gmail.com>
15 lines
527 B
Python
15 lines
527 B
Python
from fastapi import status
|
|
|
|
from cognee.exceptions.exceptions import CogneeConfigurationError
|
|
|
|
|
|
class CloudConnectionError(CogneeConfigurationError):
|
|
"""Raised when the connection to the cloud service fails."""
|
|
|
|
def __init__(
|
|
self,
|
|
message: str = "Failed to connect to the cloud service. Please check your cloud API key in local instance.",
|
|
name: str = "CloudConnnectionError",
|
|
status_code=status.HTTP_503_SERVICE_UNAVAILABLE,
|
|
):
|
|
super().__init__(message, name, status_code)
|