Alerting: recognize Cortex datasources correctly in the frontend (#44316)

* Alerting: always use msg field for user facing errors

* fix: revert front-end Cortex detection

Co-authored-by: gillesdemey <gilles.de.mey@gmail.com>
This commit is contained in:
Jean-Philippe Quéméner
2022-01-21 15:44:11 +01:00
committed by GitHub
co-authored by gillesdemey
parent e1af78954f
commit 8ee3f59cd4
7 changed files with 38 additions and 34 deletions
+1 -1
View File
@@ -265,7 +265,7 @@ func ErrResp(status int, err error, msg string, args ...interface{}) *response.N
if msg != "" {
err = errors.WithMessagef(err, msg, args...)
}
return response.Error(status, "API error", err)
return response.Error(status, err.Error(), err)
}
// accessForbiddenResp creates a response of forbidden access.