mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-24 20:24:09 +00:00
Merge pull request #104240 from feeltimeQ/fix/Log_attempts_to_output_resp.Body
fix Log attempts to output resp.Body #104184
This commit is contained in:
commit
f12d73304d
@ -203,7 +203,7 @@ func ReadURL(url string, client *http.Client, header *http.Header) (body []byte,
|
||||
defer resp.Body.Close()
|
||||
|
||||
if resp.StatusCode != http.StatusOK {
|
||||
klog.V(2).Infof("body of failing http response: %v", resp.Body)
|
||||
klog.V(2).InfoS("Failed to read URL", "statusCode", resp.StatusCode, "URL", url)
|
||||
return nil, &HTTPError{
|
||||
StatusCode: resp.StatusCode,
|
||||
URL: url,
|
||||
|
@ -60,7 +60,7 @@ func ReadURL(url string, client *http.Client, header *http.Header) (body []byte,
|
||||
defer resp.Body.Close()
|
||||
|
||||
if resp.StatusCode != http.StatusOK {
|
||||
klog.V(2).Infof("body of failing http response: %v", resp.Body)
|
||||
klog.V(2).InfoS("Failed to read URL", "statusCode", resp.StatusCode, "URL", url)
|
||||
return nil, &HTTPError{
|
||||
StatusCode: resp.StatusCode,
|
||||
URL: url,
|
||||
|
Loading…
Reference in New Issue
Block a user