Download internal/application/dto/error.go from shimen/API: direct link, hf CLI and curl.
- Browser
- Download file 720 Bytes
-
https://huggingface.co/spaces/shimen/API/resolve/main/internal/application/dto/error.go
- Command line
-
hf download hf://spaces/shimen/API/internal/application/dto/error.go
-
curl -L -o error.go https://huggingface.co/spaces/shimen/API/resolve/main/internal/application/dto/error.go
720 Bytes
| package dto | |
| // ErrorResponse is the standardized error response for clients | |
| type ErrorResponse struct { | |
| Success bool `json:"success" example:"false"` | |
| Error ErrorInfo `json:"error"` | |
| RequestID string `json:"request_id,omitempty"` | |
| } | |
| type ErrorInfo struct { | |
| Code string `json:"code" example:"AUTH_INVALID_CREDENTIALS"` | |
| Message string `json:"message" example:"Invalid credentials provided"` | |
| Details map[string]interface{} `json:"details,omitempty"` | |
| } | |
| // InternalErrorResponse is returned for 500 errors (no sensitive info) | |
| type InternalErrorResponse struct { | |
| Success bool `json:"success"` | |
| Error string `json:"error"` | |
| RequestID string `json:"request_id"` | |
| } | |