Spaces:
Sleeping
Sleeping
Download app/api/errors.py from suplo6669/sharpify-ai-inference: direct link, hf CLI and curl.
- Browser
- Download file 339 Bytes
-
https://huggingface.co/spaces/suplo6669/sharpify-ai-inference/resolve/main/app/api/errors.py
- Command line
-
hf download hf://spaces/suplo6669/sharpify-ai-inference/app/api/errors.py
-
curl -L -o errors.py https://huggingface.co/spaces/suplo6669/sharpify-ai-inference/resolve/main/app/api/errors.py
339 Bytes
| """Safe errors exposed by the HTTP API.""" | |
| class ApiError(Exception): | |
| """An expected API failure with a safe client message.""" | |
| def __init__(self, status_code: int, code: str, message: str) -> None: | |
| super().__init__(message) | |
| self.status_code = status_code | |
| self.code = code | |
| self.message = message | |