accounts/rag-server/internal/rag/embed/errors.go

18 lines
363 B
Go
Raw Normal View History

2025-08-14 16:32:03 +08:00
package embed
// HTTPError represents an HTTP error returned by embedding services.
type HTTPError struct {
Code int
Status string
}
// Error implements the error interface.
func (e *HTTPError) Error() string {
return e.Status
}
// StatusCode returns the HTTP status code associated with the error.
func (e *HTTPError) StatusCode() int {
return e.Code
}