Spaces:
Runtime error
Runtime error
Download src/core/exceptions.py from Harshilforworks/course-rag-backend: direct link, hf CLI and curl.
- Browser
- Download file 598 Bytes
-
https://huggingface.co/spaces/Harshilforworks/course-rag-backend/resolve/main/src/core/exceptions.py
- Command line
-
hf download hf://spaces/Harshilforworks/course-rag-backend/src/core/exceptions.py
-
curl -L -o exceptions.py https://huggingface.co/spaces/Harshilforworks/course-rag-backend/resolve/main/src/core/exceptions.py
598 Bytes
| class AppError(Exception): | |
| status_code: int = 500 | |
| def __init__(self, detail: str, status_code: int | None = None) -> None: | |
| super().__init__(detail) | |
| self.detail = detail | |
| if status_code is not None: | |
| self.status_code = status_code | |
| class RetrievalError(AppError): | |
| status_code = 503 | |
| class IngestionError(AppError): | |
| status_code = 503 | |
| class GraphError(AppError): | |
| status_code = 500 | |
| class GraphNodeNotFoundError(GraphError): | |
| status_code = 404 | |
| class LLMServiceError(AppError): | |
| status_code = 503 | |
| class ValidationError(AppError): | |
| status_code = 400 | |