{"action":"created","issue":{"url":"https://api.github.com/repos/kubernetes/kubernetes/issues/45970","repository_url":"https://api.github.com/repos/kubernetes/kubernetes","labels_url":"https://api.github.com/repos/kubernetes/kubernetes/issues/45970/labels{/name}","comments_url":"https://api.github.com/repos/kubernetes/kubernetes/issues/45970/comments","events_url":"https://api.github.com/repos/kubernetes/kubernetes/issues/45970/events","html_url":"https://github.com/kubernetes/kubernetes/issues/45970","id":229414483,"number":45970,"title":"401/403 apiserver errors do not return 'Status' objects","user":{"login":"ankon","id":1210641,"avatar_url":"https://avatars2.githubusercontent.com/u/1210641?v=3","gravatar_id":"","url":"https://api.github.com/users/ankon","html_url":"https://github.com/ankon","followers_url":"https://api.github.com/users/ankon/followers","following_url":"https://api.github.com/users/ankon/following{/other_user}","gists_url":"https://api.github.com/users/ankon/gists{/gist_id}","starred_url":"https://api.github.com/users/ankon/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ankon/subscriptions","organizations_url":"https://api.github.com/users/ankon/orgs","repos_url":"https://api.github.com/users/ankon/repos","events_url":"https://api.github.com/users/ankon/events{/privacy}","received_events_url":"https://api.github.com/users/ankon/received_events","type":"User","site_admin":false},"labels":[{"id":173493835,"url":"https://api.github.com/repos/kubernetes/kubernetes/labels/sig/api-machinery","name":"sig/api-machinery","color":"d2b48c","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":3,"created_at":"2017-05-17T16:28:56Z","updated_at":"2017-05-18T08:13:15Z","closed_at":null,"body":"<!-- Thanks for filing an issue! Before hitting the button, please answer these questions.-->\r\n\r\n**Is this a request for help?** (If yes, you should use our troubleshooting guide and community support channels, see http://kubernetes.io/docs/troubleshooting/.): No.\r\n\r\n\r\n**What keywords did you search in Kubernetes issues before filing this one?** (If you have found any duplicates, you should instead reply there.): \"status forbidden unauthorized\"\r\n\r\n---\r\n\r\n**Is this a BUG REPORT or FEATURE REQUEST?** (choose one): Bug\r\n\r\n**Kubernetes version** (use `kubectl version`):\r\n\r\nServer Version: version.Info{Major:\"1\", Minor:\"5\", GitVersion:\"v1.5.3\", GitCommit:\"029c3a408176b55c30846f0faedf56aae5992e9b\", GitTreeState:\"clean\", BuildDate:\"1970-01-01T00:00:00Z\", GoVersion:\"go1.7\", Compiler:\"gc\", Platform:\"linux/amd64\"}\r\n\r\n**Environment**:\r\n- **Cloud provider or hardware configuration**: minikube 0.18.0 / kubernetes 1.5.3\r\n- **OS** (e.g. from /etc/os-release): \r\n- **Kernel** (e.g. `uname -a`):\r\n- **Install tools**:\r\n- **Others**:\r\n\r\n\r\n**What happened**:\r\n\r\nI'm trying to query the API server and am getting unexpected results like `Forbidden: \"/apis\"` when not providing (enough) credentials.\r\n\r\n**What you expected to happen**:\r\n\r\nAccording to https://github.com/kubernetes/community/blob/master/contributors/devel/api-conventions.md#http-status-codes I expected the server to return a Status object with status = 'Failure' and code = 403/401.\r\n\r\n**How to reproduce it** (as minimally and precisely as possible):\r\n\r\n`curl -k API-SERVER-URL/apis`\r\n\r\n**Anything else we need to know**:\r\n\r\nI'm writing a client library, and want to handle errors properly, so any additional help/information or insights into the why of this behavior are very welcome as well :)"},"comment":{"url":"https://api.github.com/repos/kubernetes/kubernetes/issues/comments/302333475","html_url":"https://github.com/kubernetes/kubernetes/issues/45970#issuecomment-302333475","issue_url":"https://api.github.com/repos/kubernetes/kubernetes/issues/45970","id":302333475,"user":{"login":"sttts","id":730123,"avatar_url":"https://avatars3.githubusercontent.com/u/730123?v=3","gravatar_id":"","url":"https://api.github.com/users/sttts","html_url":"https://github.com/sttts","followers_url":"https://api.github.com/users/sttts/followers","following_url":"https://api.github.com/users/sttts/following{/other_user}","gists_url":"https://api.github.com/users/sttts/gists{/gist_id}","starred_url":"https://api.github.com/users/sttts/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sttts/subscriptions","organizations_url":"https://api.github.com/users/sttts/orgs","repos_url":"https://api.github.com/users/sttts/repos","events_url":"https://api.github.com/users/sttts/events{/privacy}","received_events_url":"https://api.github.com/users/sttts/received_events","type":"User","site_admin":false},"created_at":"2017-05-18T08:13:15Z","updated_at":"2017-05-18T08:13:15Z","body":"We have quite a number of error code paths which do not write Status object, not only \"forbidden\". It's mostly a matter of wiring through the context and serializer."}}
{"actor":{"display_login":"sttts"}}