From c20c88e0db57ed5e51e47f8d295fb8cd59964a18 Mon Sep 17 00:00:00 2001 From: Julien Pivotto <291750+roidelapluie@users.noreply.github.com> Date: Fri, 17 Apr 2026 17:03:25 +0200 Subject: [PATCH] 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> --- web/api/v1/api.go | 1 + 1 file changed, 1 insertion(+) diff --git a/web/api/v1/api.go b/web/api/v1/api.go index 28ad09051e..955df918fa 100644 --- a/web/api/v1/api.go +++ b/web/api/v1/api.go @@ -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,