Skip to content

Commit

Permalink
Log more details when we get the 0-length error
Browse files Browse the repository at this point in the history
Change-Id: I9733521a3afd91c54c19fe08d0622df4187c0c0c
  • Loading branch information
dims committed Jan 1, 2019
1 parent 7946a9a commit f92ee4e
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion staging/src/k8s.io/client-go/rest/request.go
Original file line number Diff line number Diff line change
Expand Up @@ -1100,7 +1100,8 @@ func (r Result) Into(obj runtime.Object) error {
return fmt.Errorf("serializer for %s doesn't exist", r.contentType)
}
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)
Expand Down

0 comments on commit f92ee4e

Please sign in to comment.