@Override
    public void exceptionCaught(ChannelHandlerContext ctx, Throwable cause) throws Exception {
        if (edgeProxy != null) {
            if (cause instanceof ReadTimeoutException) {
                edgeProxy.getPassport().add(PassportState.ORIGIN_CH_READ_TIMEOUT);
                logger.debug(
                        "read timeout on origin channel {} ", ChannelUtils.channelInfoForLogging(ctx.channel()), cause);
            } else if (cause instanceof IOException) {
                edgeProxy.getPassport().add(PassportState.ORIGIN_CH_IO_EX);
                logger.debug(
                        "I/O error on origin channel {} ", ChannelUtils.channelInfoForLogging(ctx.channel()), cause);
            } else {
                logger.error("Error from Origin connection:", cause);
            }
            edgeProxy.errorFromOrigin(cause);
        }
        ctx.fireExceptionCaught(cause);
    }
Override to add custom pre-write functionality

@param ctx     channel handler context
@param zuulReq request message to modify
zuul-core/src/main/java/com/netflix/zuul/netty/server/OriginResponseReceiver.java