on main help sign in
fix: http log
commit0b477ea49470db978e9f9eb43a224def73c41101 authorKujtim Hoxha <kujtimii.h@gmail.com> dateSat 2 Aug 2025, 17:02 (1 year ago) parent2b9430f
1 file changed+3
internal/log/http.go+3
internal/log/http.go+3
@@ -79,6 +79,9 @@ func (h *HTTPRoundTripLogger) RoundTrip(req *http.Request) (*http.Response, erro
7979}
8080
8181func bodyToString(body io.ReadCloser) string {
82+ if body == nil {
83+ return ""
84+ }
8285 src, err := io.ReadAll(body)
8386 if err != nil {
8487 slog.Error("Failed to read body", "error", err)