use consistent error for instant and range query 400
Signed-off-by: Ben Ye <benye@amazon.com>
This commit is contained in:
parent
6e0a46900b
commit
fb67d368a2
|
@ -522,7 +522,7 @@ func (api *API) queryRange(r *http.Request) (result apiFuncResult) {
|
||||||
}
|
}
|
||||||
qry, err := api.QueryEngine.NewRangeQuery(api.Queryable, opts, r.FormValue("query"), start, end, step)
|
qry, err := api.QueryEngine.NewRangeQuery(api.Queryable, opts, r.FormValue("query"), start, end, step)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return apiFuncResult{nil, &apiError{errorBadData, err}, nil, nil}
|
return invalidParamError(err, "query")
|
||||||
}
|
}
|
||||||
// From now on, we must only return with a finalizer in the result (to
|
// From now on, we must only return with a finalizer in the result (to
|
||||||
// be called by the caller) or call qry.Close ourselves (which is
|
// be called by the caller) or call qry.Close ourselves (which is
|
||||||
|
|
Loading…
Reference in New Issue