accounts/internal/rag/embed/errors.go
2025-08-14 16:32:03 +08:00

18 lines
363 B
Go

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
}