• Kubernetes Submit Queue's avatar
    Merge pull request #30969 from asalkeld/raw-status-code · c5e7e512
    Kubernetes Submit Queue authored
    Automatic merge from submit-queue
    
    Make sure the StatusCode is taken into account in DoRaw()
    
    **What this PR does / why we need it**:
    Currently if there is an error (not found) the error printed out
    is to do with the inablity to convert an empty body into the expected json.
    
    This patch will fill in the err correctly.
    
    example of before (with NotFound error):
    $ kubectl top node
    failed to unmarshall heapster response: json: cannot unmarshal object into Go value of type []v1alpha1.NodeMetrics
    
    Now:
    $ kubectl top node
    the server could not find the requested resource (get services http:heapster:)
    
    **Which issue this PR fixes** 
    related to bug #30818
    
    **Special notes for your reviewer**:
    None
    
    **Release note**:
    ```release-note
    NONE
    ```
    c5e7e512
Name
Last commit
Last update
.github Loading commit data...
Godeps Loading commit data...
api/swagger-spec Loading commit data...
build Loading commit data...
cluster Loading commit data...
cmd Loading commit data...
contrib Loading commit data...
docs Loading commit data...
examples Loading commit data...
federation Loading commit data...
hack Loading commit data...
hooks Loading commit data...
logo Loading commit data...
pkg Loading commit data...
plugin Loading commit data...
release Loading commit data...
staging/src/k8s.io/client-go Loading commit data...
test Loading commit data...
third_party Loading commit data...
vendor Loading commit data...
www Loading commit data...
.generated_docs Loading commit data...
.gitignore Loading commit data...
CHANGELOG.md Loading commit data...
CONTRIB.md Loading commit data...
CONTRIBUTING.md Loading commit data...
DESIGN.md Loading commit data...
LICENSE Loading commit data...
Makefile Loading commit data...
Makefile.generated_files Loading commit data...
OWNERS Loading commit data...
README.md Loading commit data...
Vagrantfile Loading commit data...
code-of-conduct.md Loading commit data...
labels.yaml Loading commit data...