• 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
..
cache Loading commit data...
chaosclient Loading commit data...
clientset_generated Loading commit data...
leaderelection Loading commit data...
metrics Loading commit data...
record Loading commit data...
restclient Loading commit data...
testdata Loading commit data...
testing/core Loading commit data...
transport Loading commit data...
typed Loading commit data...
unversioned Loading commit data...
OWNERS Loading commit data...