Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Log Response Details for Notifier errors for Webhooks, Pushover and VictorOps #3103

Merged
merged 4 commits into from
Oct 19, 2022
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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)
OktarianTB marked this conversation as resolved.
Show resolved Hide resolved

return n.retrier.Check(resp.StatusCode, nil)
return n.retrier.Check(resp.StatusCode, resp.Body)
OktarianTB marked this conversation as resolved.
Show resolved Hide resolved
}