dsmiley commented on code in PR #2123:
URL: https://github.com/apache/solr/pull/2123#discussion_r1418058054


##########
solr/core/src/java/org/apache/solr/handler/component/SearchHandler.java:
##########
@@ -598,7 +598,7 @@ public void handleRequestBody(SolrQueryRequest req, 
SolrQueryResponse rsp) throw
                 boolean allShardsFailed = includesTopIdsPurpose && 
allResponsesHaveExceptions;
                 // if all shards fail, fail the request despite shards.tolerant
                 if (allShardsFailed) {
-                  throw (SolrException) srsp.getException();
+                  throw new 
SolrException(SolrException.ErrorCode.SERVER_ERROR, srsp.getException());

Review Comment:
   I agree completely @tflobbe ; this is what I mentioned internally :-).  
Perhaps create a little utility method here for this pattern used twice.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to