mirror of
https://github.com/prometheus/alertmanager
synced 2024-12-28 00:52:13 +00:00
Merge branch 'master' of github.com:prometheus/alertmanager
This commit is contained in:
commit
387f23a96f
@ -683,6 +683,8 @@ func (n *OpsGenie) Notify(ctx context.Context, as ...*types.Alert) error {
|
||||
resp.Body.Close()
|
||||
|
||||
if resp.StatusCode/100 != 2 {
|
||||
body, _ := ioutil.ReadAll(resp.Body)
|
||||
log.With("incident", key).Debugf("unexpected OpsGenie response %s: %s", resp.Status, body)
|
||||
return fmt.Errorf("unexpected status code %v", resp.StatusCode)
|
||||
}
|
||||
return nil
|
||||
|
Loading…
Reference in New Issue
Block a user