Alerting: log errors happening in the API on server side (#43192)

* Alerting: log errors happening in the API on server side

* adapt tests to reflect changed payload
This commit is contained in:
Jean-Philippe Quéméner
2021-12-16 13:33:10 +01:00
committed by GitHub
parent 8e8b0616fe
commit b605340668
6 changed files with 29 additions and 29 deletions
@@ -64,7 +64,7 @@ func TestAdminConfiguration_SendingToExternalAlertmanagers(t *testing.T) {
resp := getRequest(t, alertsURL, http.StatusNotFound) // nolint
b, err := ioutil.ReadAll(resp.Body)
require.NoError(t, err)
require.JSONEq(t, string(b), "{\"message\": \"no admin configuration available\"}")
require.JSONEq(t, string(b), "{\"message\": \"API error\",\"error\": \"no admin configuration available\"}")
}
// Now, lets re-set external Alertmanagers for main organisation.