mirror of
https://github.com/kubernetes/client-go.git
synced 2025-06-28 07:57:20 +00:00
Log more details when we get the 0-length error
Change-Id: I9733521a3afd91c54c19fe08d0622df4187c0c0c Kubernetes-commit: f92ee4e4e42c260780b64cb3bd2a153947b49c50
This commit is contained in:
parent
1a4f03865c
commit
00496caa6a
@ -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)
|
||||||
|
Loading…
Reference in New Issue
Block a user