Spaces:
Sleeping
Sleeping
Download app/services/flmcp/errors.py from Rthur2003/crowncode-backend: direct link, hf CLI and curl.
- Browser
- Download file 433 Bytes
-
https://huggingface.co/spaces/Rthur2003/crowncode-backend/resolve/main/app/services/flmcp/errors.py
- Command line
-
hf download hf://spaces/Rthur2003/crowncode-backend/app/services/flmcp/errors.py
-
curl -L -o errors.py https://huggingface.co/spaces/Rthur2003/crowncode-backend/resolve/main/app/services/flmcp/errors.py
433 Bytes
| """API Errors matching RFC 9457 application/problem+json.""" | |
| from __future__ import annotations | |
| class ApiError(Exception): | |
| """A failure the API reports as application/problem+json (RFC 9457).""" | |
| def __init__(self, status: int, code: str, detail: str, **extra: object) -> None: | |
| super().__init__(detail) | |
| self.status = status | |
| self.code = code | |
| self.detail = detail | |
| self.extra = extra | |