Unverified Commit fb1a8307 authored by Kubernetes Prow Robot's avatar Kubernetes Prow Robot Committed by GitHub

Merge pull request #72466 from dims/extra-logging-for-0-length-response

Log more details when we get the 0-length error
parents 02e6c18c f92ee4e4
...@@ -1100,7 +1100,8 @@ func (r Result) Into(obj runtime.Object) error { ...@@ -1100,7 +1100,8 @@ func (r Result) Into(obj runtime.Object) error {
return fmt.Errorf("serializer for %s doesn't exist", r.contentType) return fmt.Errorf("serializer for %s doesn't exist", r.contentType)
} }
if len(r.body) == 0 { if len(r.body) == 0 {
return fmt.Errorf("0-length response") return fmt.Errorf("0-length response with status code: %d and content type: %s",
r.statusCode, r.contentType)
} }
out, _, err := r.decoder.Decode(r.body, nil, obj) out, _, err := r.decoder.Decode(r.body, nil, obj)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment