From 0b477ea49470db978e9f9eb43a224def73c41101 Mon Sep 17 00:00:00 2001 From: Kujtim Hoxha Date: Sat, 2 Aug 2025 17:02:24 +0200 Subject: [PATCH] fix: http log --- internal/log/http.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/internal/log/http.go b/internal/log/http.go index 1091e5706c09be374e6775f8906c91505e10b33f..2c74bd05201ad9cbd8d60c6e3c3db3f637fb99b3 100644 --- a/internal/log/http.go +++ b/internal/log/http.go @@ -79,6 +79,9 @@ func (h *HTTPRoundTripLogger) RoundTrip(req *http.Request) (*http.Response, erro } func bodyToString(body io.ReadCloser) string { + if body == nil { + return "" + } src, err := io.ReadAll(body) if err != nil { slog.Error("Failed to read body", "error", err)