mirror of
https://github.com/StackExchange/dnscontrol.git
synced 2024-09-20 23:06:23 +08:00
ccb582b278
* Remove deprecated io/ioutil * fixup! * staticcheck and linting * revert models/provider.go * Fix imports to new style * linting
13 lines
342 B
Go
13 lines
342 B
Go
package hexonet
|
|
|
|
import (
|
|
"fmt"
|
|
|
|
"github.com/hexonet/go-sdk/v3/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+" %q. [%v %s]", objectid, r.GetCode(), r.GetDescription())
|
|
}
|