mirror of
https://github.com/VictoriaMetrics/VictoriaMetrics.git
synced 2025-01-10 15:14:09 +00:00
app/vmselect: simplify code a bit after 63e0f16062
Use only a single call to prometheus.WriteErrorResponse() inside sendPrometheusError
This commit is contained in:
parent
5ad1c2b46a
commit
994b3da361
1 changed files with 1 additions and 2 deletions
|
@ -741,8 +741,7 @@ func sendPrometheusError(w http.ResponseWriter, r *http.Request, err error) {
|
||||||
|
|
||||||
var ure *promql.UserReadableError
|
var ure *promql.UserReadableError
|
||||||
if errors.As(err, &ure) {
|
if errors.As(err, &ure) {
|
||||||
prometheus.WriteErrorResponse(w, statusCode, ure)
|
err = ure
|
||||||
return
|
|
||||||
}
|
}
|
||||||
prometheus.WriteErrorResponse(w, statusCode, err)
|
prometheus.WriteErrorResponse(w, statusCode, err)
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue