return 400 if user input error

This commit is contained in:
Mitsuhiro Tanda
2018-07-24 16:58:48 +09:00
parent 4d722b2177
commit d9bf894383
2 changed files with 18 additions and 5 deletions

View File

@@ -52,7 +52,7 @@ func QueryMetrics(c *m.ReqContext, reqDto dtos.MetricRequest) Response {
if res.Error != nil {
res.ErrorString = res.Error.Error()
resp.Message = res.ErrorString
statusCode = 500
statusCode = 400
}
}