mirror of
https://github.com/prometheus/prometheus.git
synced 2026-05-05 12:26:14 +02:00
web/api: return after respondError in serveWALReplayStatus
Without the return, a successful respond() call would always follow the error response, writing a second body to an already-written ResponseWriter and producing a malformed HTTP response. Signed-off-by: Julien Pivotto <291750+roidelapluie@users.noreply.github.com>
This commit is contained in:
parent
34cebfe953
commit
c20c88e0db
@ -1968,6 +1968,7 @@ func (api *API) serveWALReplayStatus(w http.ResponseWriter, r *http.Request) {
|
||||
status, err := api.db.WALReplayStatus()
|
||||
if err != nil {
|
||||
api.respondError(w, &apiError{errorInternal, err}, nil)
|
||||
return
|
||||
}
|
||||
api.respond(w, r, walReplayStatus{
|
||||
Min: status.Min,
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user