Spaces:
Runtime error
Runtime error
Download src/app/core/exceptions.py from welcometoFightclub/datacollection_server: direct link, hf CLI and curl.
- Browser
- Download file 644 Bytes
-
https://huggingface.co/spaces/welcometoFightclub/datacollection_server/resolve/main/src/app/core/exceptions.py
- Command line
-
hf download hf://spaces/welcometoFightclub/datacollection_server/src/app/core/exceptions.py
-
curl -L -o exceptions.py https://huggingface.co/spaces/welcometoFightclub/datacollection_server/resolve/main/src/app/core/exceptions.py
644 Bytes
| class ApplicationError(Exception): | |
| """Base class for safe errors that can be returned by the API.""" | |
| status_code = 500 | |
| code = "INTERNAL_ERROR" | |
| def __init__(self, message: str): | |
| self.message = message | |
| super().__init__(message) | |
| class ValidationError(ApplicationError): | |
| status_code = 400 | |
| code = "INVALID_PDF" | |
| class NotFoundError(ApplicationError): | |
| status_code = 404 | |
| code = "JOB_NOT_FOUND" | |
| class ConflictError(ApplicationError): | |
| status_code = 409 | |
| code = "RESULT_NOT_AVAILABLE" | |
| class SubmissionError(ApplicationError): | |
| status_code = 502 | |
| code = "EXTRACTION_SUBMISSION_FAILED" | |