{"action":"created","issue":{"url":"https://api.github.com/repos/doorkeeper-gem/doorkeeper/issues/550","labels_url":"https://api.github.com/repos/doorkeeper-gem/doorkeeper/issues/550/labels{/name}","comments_url":"https://api.github.com/repos/doorkeeper-gem/doorkeeper/issues/550/comments","events_url":"https://api.github.com/repos/doorkeeper-gem/doorkeeper/issues/550/events","html_url":"https://github.com/doorkeeper-gem/doorkeeper/issues/550","id":54136233,"number":550,"title":"Minor: Error response HTTP status differs from OAuth Spec","user":{"login":"ahegyi","id":421330,"avatar_url":"https://avatars.githubusercontent.com/u/421330?v=3","gravatar_id":"","url":"https://api.github.com/users/ahegyi","html_url":"https://github.com/ahegyi","followers_url":"https://api.github.com/users/ahegyi/followers","following_url":"https://api.github.com/users/ahegyi/following{/other_user}","gists_url":"https://api.github.com/users/ahegyi/gists{/gist_id}","starred_url":"https://api.github.com/users/ahegyi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ahegyi/subscriptions","organizations_url":"https://api.github.com/users/ahegyi/orgs","repos_url":"https://api.github.com/users/ahegyi/repos","events_url":"https://api.github.com/users/ahegyi/events{/privacy}","received_events_url":"https://api.github.com/users/ahegyi/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/doorkeeper-gem/doorkeeper/labels/spec","name":"spec","color":"DDDDDD"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2015-01-13T00:46:41Z","updated_at":"2015-02-14T17:43:19Z","closed_at":null,"body":"I just noticed that in the OAuth spec, when there is an error response upon issuing an access token, a `400 Bad Request` should be returned (in most cases): http://tools.ietf.org/html/rfc6749#section-5.2\r\n\r\nHowever, it looks like the error code sent back from Doorkeeper is always a `401 Unauthorized`: https://github.com/doorkeeper-gem/doorkeeper/blob/master/lib/doorkeeper/oauth/error_response.rb#L29\r\n\r\nDoes Doorkeeper intentionally always use a `401` or am I misunderstanding something? Thanks!"},"comment":{"url":"https://api.github.com/repos/doorkeeper-gem/doorkeeper/issues/comments/74384449","html_url":"https://github.com/doorkeeper-gem/doorkeeper/issues/550#issuecomment-74384449","issue_url":"https://api.github.com/repos/doorkeeper-gem/doorkeeper/issues/550","id":74384449,"user":{"login":"tute","id":54260,"avatar_url":"https://avatars.githubusercontent.com/u/54260?v=3","gravatar_id":"","url":"https://api.github.com/users/tute","html_url":"https://github.com/tute","followers_url":"https://api.github.com/users/tute/followers","following_url":"https://api.github.com/users/tute/following{/other_user}","gists_url":"https://api.github.com/users/tute/gists{/gist_id}","starred_url":"https://api.github.com/users/tute/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tute/subscriptions","organizations_url":"https://api.github.com/users/tute/orgs","repos_url":"https://api.github.com/users/tute/repos","events_url":"https://api.github.com/users/tute/events{/privacy}","received_events_url":"https://api.github.com/users/tute/received_events","type":"User","site_admin":false},"created_at":"2015-02-14T17:43:19Z","updated_at":"2015-02-14T17:43:19Z","body":"ping @ahegyi "}}