Merge pull request #2259 from donnpebe/fix

Fix wrong metrics counter
This commit is contained in:
Torkel Ödegaard 2015-06-30 08:07:04 +02:00
commit 647e43dcbd
2 changed files with 6 additions and 6 deletions

View File

@ -87,10 +87,10 @@ func ApiError(status int, message string, err error) *NormalResponse {
switch status {
case 404:
resp["message"] = "Not Found"
metrics.M_Api_Status_500.Inc(1)
case 500:
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"
}

View File

@ -197,10 +197,10 @@ func (ctx *Context) JsonApiErr(status int, message string, err error) {
switch status {
case 404:
resp["message"] = "Not Found"
metrics.M_Api_Status_500.Inc(1)
case 500:
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"
}