{"action":"closed","issue":{"url":"https://api.github.com/repos/eclipse/jetty.project/issues/450","repository_url":"https://api.github.com/repos/eclipse/jetty.project","labels_url":"https://api.github.com/repos/eclipse/jetty.project/issues/450/labels{/name}","comments_url":"https://api.github.com/repos/eclipse/jetty.project/issues/450/comments","events_url":"https://api.github.com/repos/eclipse/jetty.project/issues/450/events","html_url":"https://github.com/eclipse/jetty.project/issues/450","id":142596105,"number":450,"title":"Client AuthenticationProtocolHandler sends request failures to response failure listener","user":{"login":"TuomasKiviaho","id":886635,"avatar_url":"https://avatars.githubusercontent.com/u/886635?v=3","gravatar_id":"","url":"https://api.github.com/users/TuomasKiviaho","html_url":"https://github.com/TuomasKiviaho","followers_url":"https://api.github.com/users/TuomasKiviaho/followers","following_url":"https://api.github.com/users/TuomasKiviaho/following{/other_user}","gists_url":"https://api.github.com/users/TuomasKiviaho/gists{/gist_id}","starred_url":"https://api.github.com/users/TuomasKiviaho/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/TuomasKiviaho/subscriptions","organizations_url":"https://api.github.com/users/TuomasKiviaho/orgs","repos_url":"https://api.github.com/users/TuomasKiviaho/repos","events_url":"https://api.github.com/users/TuomasKiviaho/events{/privacy}","received_events_url":"https://api.github.com/users/TuomasKiviaho/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":4,"created_at":"2016-03-22T09:45:05Z","updated_at":"2016-04-01T10:50:17Z","closed_at":"2016-04-01T10:50:16Z","body":"I was getting an NPE from missing exception at my failure listener although I knew there should've been an exception present.\r\n\r\nThe reason was that for some reason `AuthenticationProtocolHandler` treats both request and response failures to response failure listener and the request failure exception is lost because of this in the stacktrace following steps (jetty 9.3.8)\r\n\r\n```\r\nResponseNotifier.notifyFailure(Response$FailureListener, Response, Throwable) line: 170\t\r\nResponseNotifier.notifyFailure(List<ResponseListener>, Response, Throwable) line: 162\t\r\nResponseNotifier.forwardFailure(List<ResponseListener>, Response, Throwable) line: 236\t\r\nResponseNotifier.forwardFailureComplete(List<ResponseListener>, Request, Throwable, Response, Throwable) line: 241\t\r\nAuthenticationProtocolHandler$AuthenticationListener.forwardFailureComplete(HttpRequest, Throwable, Response, Throwable) line: 209\t\r\nAuthenticationProtocolHandler$AuthenticationListener.onComplete(Result) line: 94\t\r\n```\r\n\r\nI think that `AuthenticationProtocolHandler` should have also a `RequestNotifier` to which request failures should be sent insetad of the `ResponseNotifier`."}}