github.com/teknogeek/dnscontrol/v2@v2.10.1-0.20200227202244-ae299b55ba42/providers/hexonet/error.go (about)

     1  package hexonet
     2  
     3  import (
     4  	"fmt"
     5  
     6  	"github.com/hexonet/go-sdk/response"
     7  )
     8  
     9  // GetHXApiError returns an error including API error code and error description.
    10  func (n *HXClient) GetHXApiError(format string, objectid string, r *response.Response) error {
    11  	return fmt.Errorf(format+" %s. [%s %s]", objectid, r.GetCode(), r.GetDescription())
    12  }