dnscontrol/providers/hexonet/error.go
Rashad J a65b310520
perf(go sdk): introducing semver to HEXONET provider (#1120)
* build(go sdk): fixed outdated dependencies issue

* refactor(.back files): removed .bak files

Co-authored-by: Rashad Jamara <rjamara@hexonet.net>
Co-authored-by: Tom Limoncelli <tlimoncelli@stackoverflow.com>
2021-04-13 07:30:32 -04:00

12 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+" %s. [%s %s]", objectid, r.GetCode(), r.GetDescription())
}