Merge pull request #12248 from yeya24/consistent-response

Use same error for instant and range query when 400
pull/12280/head
Julien Pivotto 2 years ago committed by GitHub
commit 8f1dc4a70f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -522,7 +522,7 @@ func (api *API) queryRange(r *http.Request) (result apiFuncResult) {
} }
qry, err := api.QueryEngine.NewRangeQuery(ctx, api.Queryable, opts, r.FormValue("query"), start, end, step) qry, err := api.QueryEngine.NewRangeQuery(ctx, 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…
Cancel
Save