private void handlerResponseError(StreamInput buffer, final TransportResponseHandler handler) {
   Throwable error;
   try {
     ThrowableObjectInputStream ois =
         new ThrowableObjectInputStream(buffer, transport.settings().getClassLoader());
     error = (Throwable) ois.readObject();
   } catch (Throwable e) {
     error =
         new TransportSerializationException(
             "Failed to deserialize exception response from stream", e);
   }
   handleException(handler, error);
 }
 public MessageChannelHandler(NettyTransport transport, ESLogger logger) {
   this.threadPool = transport.threadPool();
   this.transportServiceAdapter = transport.transportServiceAdapter();
   this.transport = transport;
   this.logger = logger;
 }
 @Override
 public void exceptionCaught(ChannelHandlerContext ctx, ExceptionEvent e) throws Exception {
   transport.exceptionCaught(ctx, e);
 }