From 649454e77b6814ad1da8f027beaa2d3baa92d2f2 Mon Sep 17 00:00:00 2001 From: Dimitry Kolyshev Date: Wed, 31 May 2023 15:11:33 +0300 Subject: [PATCH] querylog: imp code --- internal/querylog/http.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/internal/querylog/http.go b/internal/querylog/http.go index cf58cfef..3570fdc4 100644 --- a/internal/querylog/http.go +++ b/internal/querylog/http.go @@ -121,7 +121,7 @@ func (l *queryLog) handleQueryLogExport(w http.ResponseWriter, r *http.Request) csvWriter := csv.NewWriter(w) defer func() { if err = csvWriter.Error(); err != nil { - http.Error(w, "writing csv", http.StatusInternalServerError) + aghhttp.Error(r, w, http.StatusInternalServerError, "writing csv") } }()