diff --git a/solr/core/src/java/org/apache/solr/servlet/SolrDispatchFilter.java b/solr/core/src/java/org/apache/solr/servlet/SolrDispatchFilter.java index 3bf4962d0c7..7c41a2677ea 100644 --- a/solr/core/src/java/org/apache/solr/servlet/SolrDispatchFilter.java +++ b/solr/core/src/java/org/apache/solr/servlet/SolrDispatchFilter.java @@ -395,10 +395,9 @@ public class SolrDispatchFilter implements Filter con.disconnect(); } } catch (IOException e) { - // return exception - resp.getWriter().println(e.getStackTrace().toString()); - throw new SolrException(SolrException.ErrorCode.BAD_REQUEST, - "This node forword query failed: " + coreUrl); + sendError(null, solrReq, req, resp, new SolrException( + SolrException.ErrorCode.SERVER_ERROR, + "Error trying to proxy request for url: " + coreUrl, e)); } }