mirror of
https://github.com/coder/coder.git
synced 2025-07-03 16:13:58 +00:00
fix: log unsuccessful webhook response body as a string (#16439)
This commit is contained in:
@ -106,7 +106,7 @@ func (w *WebhookHandler) dispatch(msgPayload types.MessagePayload, titlePlaintex
|
||||
return true, xerrors.Errorf("non-2xx response (%d), read body: %w", resp.StatusCode, err)
|
||||
}
|
||||
w.log.Warn(ctx, "unsuccessful delivery", slog.F("status_code", resp.StatusCode),
|
||||
slog.F("response", respBody[:n]), slog.F("msg_id", msgID))
|
||||
slog.F("response", string(respBody[:n])), slog.F("msg_id", msgID))
|
||||
return true, xerrors.Errorf("non-2xx response (%d)", resp.StatusCode)
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user