mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
Fix wrong metrics counter
This commit is contained in:
parent
a38a06a077
commit
df33cbc8c5
@ -87,10 +87,10 @@ func ApiError(status int, message string, err error) *NormalResponse {
|
|||||||
|
|
||||||
switch status {
|
switch status {
|
||||||
case 404:
|
case 404:
|
||||||
resp["message"] = "Not Found"
|
|
||||||
metrics.M_Api_Status_500.Inc(1)
|
|
||||||
case 500:
|
|
||||||
metrics.M_Api_Status_404.Inc(1)
|
metrics.M_Api_Status_404.Inc(1)
|
||||||
|
resp["message"] = "Not Found"
|
||||||
|
case 500:
|
||||||
|
metrics.M_Api_Status_500.Inc(1)
|
||||||
resp["message"] = "Internal Server Error"
|
resp["message"] = "Internal Server Error"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -197,10 +197,10 @@ func (ctx *Context) JsonApiErr(status int, message string, err error) {
|
|||||||
|
|
||||||
switch status {
|
switch status {
|
||||||
case 404:
|
case 404:
|
||||||
resp["message"] = "Not Found"
|
|
||||||
metrics.M_Api_Status_500.Inc(1)
|
|
||||||
case 500:
|
|
||||||
metrics.M_Api_Status_404.Inc(1)
|
metrics.M_Api_Status_404.Inc(1)
|
||||||
|
resp["message"] = "Not Found"
|
||||||
|
case 500:
|
||||||
|
metrics.M_Api_Status_500.Inc(1)
|
||||||
resp["message"] = "Internal Server Error"
|
resp["message"] = "Internal Server Error"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user