@Override
            public void exceptionCaught(ChannelHandlerContext ctx, Throwable cause) throws Exception {
                if (handshakeFailed == null) {
                    // An exception was raised before the handshake event was completed.
                    // A legacy HTTPS server such as Microsoft-IIS/8.5 may reset the connection
                    // if no cipher suites in common.
                    final String tlsVersion = sslHandler.engine().getSession().getProtocol();
                    final PreTlsHandshakeException preTlsHandshakeException = new PreTlsHandshakeException(
                            "An unexpected exception before a TLS handshake starts. The possible reason could" +
                            " be one of: [connection forcefully closed by peer, unsupported TLS version, " +
                            "no cipher suites in common, etc.] " +
                            "(TLS version: " + tlsVersion + ", cipher suites: " + sslCtx.cipherSuites() + ')',
                            cause);
                    setPendingException(ctx, preTlsHandshakeException);
                    return;
                }
                if (handshakeFailed &&
                    cause instanceof DecoderException &&
                    cause.getCause() instanceof SSLException) {
                    setPendingException(ctx, cause.getCause());
                    return;
                }

                Exceptions.logIfUnexpected(logger, ctx.channel(), cause);
                ctx.close();
            }
See <a href="https://http2.github.io/http2-spec/#discover-https">HTTP/2 specification</a>.
core/src/main/java/com/linecorp/armeria/client/HttpClientPipelineConfigurator.java