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:
Julien Pivotto 2026-04-17 17:03:25 +02:00
parent 34cebfe953
commit c20c88e0db

View File

@ -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,