{"action":"opened","issue":{"url":"https://api.github.com/repos/eclipse/jetty.project/issues/980","repository_url":"https://api.github.com/repos/eclipse/jetty.project","labels_url":"https://api.github.com/repos/eclipse/jetty.project/issues/980/labels{/name}","comments_url":"https://api.github.com/repos/eclipse/jetty.project/issues/980/comments","events_url":"https://api.github.com/repos/eclipse/jetty.project/issues/980/events","html_url":"https://github.com/eclipse/jetty.project/issues/980","id":181137798,"number":980,"title":"HttpClient should report HTTP/2 INADEQUATE_SECURITY_ERROR better","user":{"login":"joakime","id":191721,"avatar_url":"https://avatars.githubusercontent.com/u/191721?v=3","gravatar_id":"","url":"https://api.github.com/users/joakime","html_url":"https://github.com/joakime","followers_url":"https://api.github.com/users/joakime/followers","following_url":"https://api.github.com/users/joakime/following{/other_user}","gists_url":"https://api.github.com/users/joakime/gists{/gist_id}","starred_url":"https://api.github.com/users/joakime/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/joakime/subscriptions","organizations_url":"https://api.github.com/users/joakime/orgs","repos_url":"https://api.github.com/users/joakime/repos","events_url":"https://api.github.com/users/joakime/events{/privacy}","received_events_url":"https://api.github.com/users/joakime/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2016-10-05T12:21:15Z","updated_at":"2016-10-05T12:21:15Z","closed_at":null,"body":"Currently, when using HttpClient with HTTP/2 and attempting to connect to an HTTP/2 server which sends a GO_AWAY / INADEQUATE_SECURITY_ERROR the HttpClient fails with a simple stacktrace showing ...\r\n\r\n```\r\nCaused by: java.util.concurrent.ExecutionException: java.nio.channels.ClosedChannelException\r\n    at org.eclipse.jetty.client.util.FutureResponseListener.getResult(FutureResponseListener.java:118)\r\n    at org.eclipse.jetty.client.util.FutureResponseListener.get(FutureResponseListener.java:101)\r\n    at org.eclipse.jetty.client.HttpRequest.send(HttpRequest.java:652)\r\n    at my code\r\n    ... 34 more\r\nCaused by: java.nio.channels.ClosedChannelException\r\n    at org.eclipse.jetty.io.WriteFlusher.onClose(WriteFlusher.java:498)\r\n    at org.eclipse.jetty.io.ssl.SslConnection$DecryptedEndPoint.onIncompleteFlush(SslConnection.java:409)\r\n    at org.eclipse.jetty.io.AbstractEndPoint$2.onIncompleteFlush(AbstractEndPoint.java:54)\r\n    at org.eclipse.jetty.io.WriteFlusher.write(WriteFlusher.java:322)\r\n    at org.eclipse.jetty.io.AbstractEndPoint.write(AbstractEndPoint.java:140)\r\n    at org.eclipse.jetty.http2.HTTP2Flusher.process(HTTP2Flusher.java:243)\r\n    at org.eclipse.jetty.util.IteratingCallback.processing(IteratingCallback.java:241)\r\n    at org.eclipse.jetty.util.IteratingCallback.succeeded(IteratingCallback.java:365)\r\n    at org.eclipse.jetty.http2.HTTP2Flusher.succeeded(HTTP2Flusher.java:258)\r\n    at org.eclipse.jetty.io.WriteFlusher$PendingState.complete(WriteFlusher.java:269)\r\n    at org.eclipse.jetty.io.WriteFlusher.completeWrite(WriteFlusher.java:394)\r\n    at org.eclipse.jetty.io.ssl.SslConnection$1.run(SslConnection.java:101)\r\n    at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:671)\r\n    at org.eclipse.jetty.util.thread.QueuedThreadPool$2.run(QueuedThreadPool.java:589)\r\n    ... 1 more\r\n```\r\n\r\nThis is a feature request to have the exception be more clear as to why the connection attempt was closed.\r\n\r\nIs it possible to have a special Http2Exception or Http2GoAwayException that can indicate that the reason for the closed connection was due to the protocol / server saying so?  \r\nPerhaps even having the message of this exception indicate the INADEQUATE_SECURITY_ERROR piece?\r\n\r\nI imagine a stack like this ...\r\n\r\n```\r\nHttp2GoAwayException: Protocol reported INADEQUATE_SECURITY_ERROR\r\n    at org.eclipse. ...\r\n    ... 13 more\r\nCaused by: java.util.concurrent.ExecutionException: java.nio.channels.ClosedChannelException\r\n    at org.eclipse.jetty.client.util.FutureResponseListener.getResult(FutureResponseListener.java:118)\r\n    ... 34 more\r\nCaused by: java.nio.channels.ClosedChannelException\r\n    at org.eclipse.jetty.io.WriteFlusher.onClose(WriteFlusher.java:498)\r\n    at org.eclipse.jetty.io.ssl.SslConnection$DecryptedEndPoint.onIncompleteFlush(SslConnection.java:409)\r\n    ... 26 more\r\n```"}}
{"actor":{"display_login":"joakime"}}