class CustomSendErrorFilter extends SendErrorFilter {

    @Override
    public Object run() {
        // Same behaviour as SendErrorFilter except for logging
        // This removes unhelpful logs, while still letting error controllers return informative responses
        try {
            RequestContext ctx = RequestContext.getCurrentContext();
            ExceptionHolder exception = findZuulException(ctx.getThrowable());
            HttpServletRequest request = ctx.getRequest();

            request.setAttribute("javax.servlet.error.status_code",
                exception.getStatusCode());

            request.setAttribute("javax.servlet.error.exception",
                exception.getThrowable());

            if (StringUtils.hasText(exception.getErrorCause())) {
                request.setAttribute("javax.servlet.error.message",
                    exception.getErrorCause());
            }

            RequestDispatcher dispatcher = request.getRequestDispatcher(this.errorPath);
            if (dispatcher != null) {
                ctx.set(SEND_ERROR_FILTER_RAN, true); // Disables other error filters
                if (!ctx.getResponse().isCommitted()) {
                    ctx.setResponseStatusCode(exception.getStatusCode());
                    dispatcher.forward(request, ctx.getResponse());
                }
            }
        } catch (Exception ex) {
            ReflectionUtils.rethrowRuntimeException(ex);
        }
        return null;
    }

    public  CustomSendErrorFilter(@Value("${error.path:/error}") String errorPath);

}