Skip to content

Commit

Permalink
Add logline for failing to compile receiver regexp
Browse files Browse the repository at this point in the history
Signed-off-by: stuart nelson <stuartnelson3@gmail.com>
  • Loading branch information
stuartnelson3 committed Apr 15, 2019
1 parent 442cd06 commit c4a0c5b
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions api/v2/api.go
Original file line number Diff line number Diff line change
Expand Up @@ -226,6 +226,7 @@ func (api *API) getAlertsHandler(params alert_ops.GetAlertsParams) middleware.Re
if params.Receiver != nil {
receiverFilter, err = regexp.Compile("^(?:" + *params.Receiver + ")$")
if err != nil {
level.Error(api.logger).Log("msg", "failed to compile receiver regex", "err", err)
return alert_ops.
NewGetAlertsBadRequest().
WithPayload(
Expand Down

0 comments on commit c4a0c5b

Please sign in to comment.