dnscontrol/providers/hexonet/error.go
Joel Margolis 1232c17293
HEXONET: Update hexonet-sdk to v2.2.3+incompatible (#662)
* Update hexonet-sdk to v2.2.3+incompatible

* Update vendor

* Go mod tidy
2020-02-27 13:04:17 -05:00

13 lines
339 B
Go

package hexonet
import (
"fmt"
"github.com/hexonet/go-sdk/response"
)
// GetHXApiError returns an error including API error code and error description.
func (n *HXClient) GetHXApiError(format string, objectid string, r *response.Response) error {
return fmt.Errorf(format+" %s. [%s %s]", objectid, r.GetCode(), r.GetDescription())
}