• Kubernetes Submit Queue's avatar
    Merge pull request #55704 from soltysh/return_real_error · 85f0a1ac
    Kubernetes Submit Queue authored
    Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.
    
    Return original error instead of negotiation one
    
    **What this PR does / why we need it**:
    When the requested type (eg. `text/html`) is not available and we're trying to hit an endpoint to which a user is for unauthorized we'll get 406, instead of 403. The reason for that is that, even if error happens we're trying to match the serializer, which fails and results in swallowing error, instead of returning raw json, for example. 
    
    This fix returns raw json for such situations.
    
    **Release note**:
    ```release-note
    NONE
    ```
    85f0a1ac
Name
Last commit
Last update
..
src/k8s.io Loading commit data...
BUILD Loading commit data...
OWNERS Loading commit data...
README.md Loading commit data...