private void fireWriteError(String requestPart, Throwable cause, ChannelHandlerContext ctx) {
        String errMesg = "Error while proxying " + requestPart + " to origin ";
        if (edgeProxy != null) {
            ProxyEndpoint ep = edgeProxy;
            edgeProxy = null;
            errMesg += ep.getOrigin().getName();
            ep.errorFromOrigin(cause);
        }
        ctx.fireExceptionCaught(new ZuulException(cause, errMesg, true));
    }
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