mirror of
https://github.com/StackExchange/dnscontrol.git
synced 2024-05-11 05:55:12 +00:00
linting (#777)
This commit is contained in:
@ -78,6 +78,9 @@ func (c *api) get(endpoint string, params requestParams) ([]byte, error) {
|
||||
// Got error from API ?
|
||||
var errResp errorResponse
|
||||
err = json.Unmarshal(bodyString, &errResp)
|
||||
if err != nil {
|
||||
return []byte{}, err
|
||||
}
|
||||
if errResp.Status == "FAILURE" {
|
||||
return bodyString, fmt.Errorf("Internet.bs API error: %s code: %d transactid: %s URL:%s%s ",
|
||||
errResp.Message, errResp.Code, errResp.TransactID,
|
||||
|
Reference in New Issue
Block a user