diff --git a/app/vmselect/main.go b/app/vmselect/main.go index 72fba898ed..fe1b7e9a7c 100644 --- a/app/vmselect/main.go +++ b/app/vmselect/main.go @@ -741,8 +741,7 @@ func sendPrometheusError(w http.ResponseWriter, r *http.Request, err error) { var ure *promql.UserReadableError if errors.As(err, &ure) { - prometheus.WriteErrorResponse(w, statusCode, ure) - return + err = ure } prometheus.WriteErrorResponse(w, statusCode, err) }