mirror of
https://github.com/VictoriaMetrics/VictoriaMetrics.git
synced 2024-11-21 14:44:00 +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
84b3c1d3bc
commit
aae06e003e
1 changed files with 1 additions and 2 deletions
|
@ -561,8 +561,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)
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue