mirror of
https://github.com/StackExchange/dnscontrol.git
synced 2025-01-12 18:37:54 +08:00
a65b310520
* 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>
12 lines
342 B
Go
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())
|
|
}
|