@@ -63,6 +63,10 @@ func (h *HTTPRoundTripLogger) RoundTrip(req *http.Request) (*http.Response, erro
65 save, resp.Body, err = drainBody(resp.Body)
65 save, resp.Body, err = drainBody(resp.Body)
67+ slog.Error("Failed to drain response body", "error", err)
66 if slog.Default().Enabled(req.Context(), slog.LevelDebug) {
70 if slog.Default().Enabled(req.Context(), slog.LevelDebug) {
67 slog.Debug(
71 slog.Debug(
68 "HTTP Response",
72 "HTTP Response",
@@ -72,10 +76,9 @@ func (h *HTTPRoundTripLogger) RoundTrip(req *http.Request) (*http.Response, erro
72 "body", bodyToString(save),
76 "body", bodyToString(save),
73 "content_length", resp.ContentLength,
77 "content_length", resp.ContentLength,
74 "duration_ms", duration.Milliseconds(),
78 "duration_ms", duration.Milliseconds(),
78− return resp, err
81+ return resp, nil
81func bodyToString(body io.ReadCloser) string {
84func bodyToString(body io.ReadCloser) string {