Change from returning error to HttpError to allow the end-user to read the Status code from the server, along with the error message we already return.
type HttpError struct {
Err error
Status int
}
func (e *HttpError) Error() string {
return e.Err.Error()
}