Skip to content

Commit

Permalink
Pass in response body to Retrier Check
Browse files Browse the repository at this point in the history
Signed-off-by: Oktarian Tilney-Bassett <oktariantilneybassett@improbable.io>
  • Loading branch information
Oktarian Tilney-Bassett committed Oct 11, 2022
1 parent 78b5a27 commit f980414
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion notify/pushover/pushover.go
Original file line number Diff line number Diff line change
Expand Up @@ -130,5 +130,5 @@ func (n *Notifier) Notify(ctx context.Context, as ...*types.Alert) (bool, error)
}
defer notify.Drain(resp)

return n.retrier.Check(resp.StatusCode, nil)
return n.retrier.Check(resp.StatusCode, resp.Body)
}
2 changes: 1 addition & 1 deletion notify/victorops/victorops.go
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ func (n *Notifier) Notify(ctx context.Context, as ...*types.Alert) (bool, error)
}
defer notify.Drain(resp)

return n.retrier.Check(resp.StatusCode, nil)
return n.retrier.Check(resp.StatusCode, resp.Body)
}

// Create the JSON payload to be sent to the VictorOps API.
Expand Down
2 changes: 1 addition & 1 deletion notify/webhook/webhook.go
Original file line number Diff line number Diff line change
Expand Up @@ -106,5 +106,5 @@ func (n *Notifier) Notify(ctx context.Context, alerts ...*types.Alert) (bool, er
}
notify.Drain(resp)

return n.retrier.Check(resp.StatusCode, nil)
return n.retrier.Check(resp.StatusCode, resp.Body)
}

0 comments on commit f980414

Please sign in to comment.