Download scratch_vision/exceptions.py from WebAshlarWA/Scratch_Vision_Game_v1_main: direct link, hf CLI and curl.
- Browser
- Download file 569 Bytes
-
https://huggingface.co/spaces/WebAshlarWA/Scratch_Vision_Game_v1_main/resolve/main/scratch_vision/exceptions.py
- Command line
-
hf download hf://spaces/WebAshlarWA/Scratch_Vision_Game_v1_main/scratch_vision/exceptions.py
-
curl -L -o exceptions.py https://huggingface.co/spaces/WebAshlarWA/Scratch_Vision_Game_v1_main/resolve/main/scratch_vision/exceptions.py
569 Bytes
| """Domain exceptions. The API layer maps these to HTTP responses.""" | |
| class AppError(Exception): | |
| status_code = 500 | |
| public_message = "❌ Scanned images are not clear please retry!" | |
| def __init__(self, detail: str = "", project_id: str = ""): | |
| super().__init__(detail or self.public_message) | |
| self.detail = detail | |
| self.project_id = project_id | |
| class InvalidUploadError(AppError): | |
| status_code = 400 | |
| public_message = "❌ Invalid upload" | |
| class PdfExtractionError(AppError): | |
| pass | |
| class PackagingError(AppError): | |
| pass | |