API / internal /application /dto /error.go
sshinmen's picture
Update HF Spaces deployment with latest changes
2e6b65c
Raw
History Blame Contribute Delete
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"`
}