Download server/exceptions.py from Vishvam10/cloudenv: direct link, hf CLI and curl.
- Browser
- Download file 461 Bytes
-
https://huggingface.co/spaces/Vishvam10/cloudenv/resolve/main/server/exceptions.py
- Command line
-
hf download hf://spaces/Vishvam10/cloudenv/server/exceptions.py
-
curl -L -o exceptions.py https://huggingface.co/spaces/Vishvam10/cloudenv/resolve/main/server/exceptions.py
461 Bytes
| class CloudEnvException(Exception): | |
| status_code: int = 500 | |
| error_code: str = "internal_error" | |
| def __init__(self, message: str, *, detail: str | None = None): | |
| super().__init__(message) | |
| self.message = message | |
| self.detail = detail | |
| class CloudEnvBadRequest(CloudEnvException): | |
| status_code = 400 | |
| error_code = "bad_request" | |
| class CloudEnvNotFound(CloudEnvException): | |
| status_code = 404 | |
| error_code = "not_found" | |