Minor improvement

This commit is contained in:
TwinProduction 2020-10-23 16:35:40 -04:00
parent 72e6d1cda9
commit 8c73d0ce88

View File

@ -81,9 +81,8 @@ func (provider *AlertProvider) Send(serviceName, alertDescription string, resolv
body, err := ioutil.ReadAll(response.Body)
if err != nil {
return nil, fmt.Errorf("call to provider alert returned status code %d", response.StatusCode)
} else {
return nil, fmt.Errorf("call to provider alert returned status code %d: %s", response.StatusCode, string(body))
}
return nil, fmt.Errorf("call to provider alert returned status code %d: %s", response.StatusCode, string(body))
}
return ioutil.ReadAll(response.Body)
}