Skip to content

Commit

Permalink
fix: return empty list if there are no alertgroupingsettings
Browse files Browse the repository at this point in the history
  • Loading branch information
alxndr13 committed Nov 11, 2024
1 parent 2a0050d commit 60a4c9b
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions alert_grouping_setting.go
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,12 @@ func (c *Client) ListAlertGroupingSettings(ctx context.Context, o ListAlertGroup
}

resp, err := c.get(ctx, "/alert_grouping_settings?"+v.Encode(), nil)

// If there are no alert grouping settings, return an empty response.
if resp.StatusCode == 404 {
return &ListAlertGroupingSettingsResponse{}, nil
}

if err != nil {
return nil, err
}
Expand Down

0 comments on commit 60a4c9b

Please sign in to comment.