Skip to content

Commit c8ef7eb

Browse files
authored
fix: log unsuccessful webhook response body as a string (#16439)
1 parent 182bb9b commit c8ef7eb

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

coderd/notifications/dispatch/webhook.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ func (w *WebhookHandler) dispatch(msgPayload types.MessagePayload, titlePlaintex
106106
return true, xerrors.Errorf("non-2xx response (%d), read body: %w", resp.StatusCode, err)
107107
}
108108
w.log.Warn(ctx, "unsuccessful delivery", slog.F("status_code", resp.StatusCode),
109-
slog.F("response", respBody[:n]), slog.F("msg_id", msgID))
109+
slog.F("response", string(respBody[:n])), slog.F("msg_id", msgID))
110110
return true, xerrors.Errorf("non-2xx response (%d)", resp.StatusCode)
111111
}
112112

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy