Download src/schemas/error.py from BilalCode/TaskFlow: direct link, hf CLI and curl.
- Browser
- Download file 557 Bytes
-
https://huggingface.co/spaces/BilalCode/TaskFlow/resolve/main/src/schemas/error.py
- Command line
-
hf download hf://spaces/BilalCode/TaskFlow/src/schemas/error.py
-
curl -L -o error.py https://huggingface.co/spaces/BilalCode/TaskFlow/resolve/main/src/schemas/error.py
557 Bytes
| from pydantic import BaseModel | |
| from typing import Optional, Dict, Any | |
| class ErrorResponse(BaseModel): | |
| """Standard error response format.""" | |
| error: str | |
| message: str | |
| details: Optional[Dict[str, Any]] = None | |
| class Config: | |
| json_schema_extra = { | |
| "example": { | |
| "error": "Validation error", | |
| "message": "The provided data is invalid", | |
| "details": { | |
| "field": "title", | |
| "constraint": "minLength" | |
| } | |
| } | |
| } | |