[
https://issues.apache.org/jira/browse/SOLR-7243?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14361048#comment-14361048
]
Shawn Heisey commented on SOLR-7243:
------------------------------------
This looks reasonable to me.
> 4.10.3 SolrJ is throwing a SERVER_ERROR exception instead of BAD_REQUEST
> ------------------------------------------------------------------------
>
> Key: SOLR-7243
> URL: https://issues.apache.org/jira/browse/SOLR-7243
> Project: Solr
> Issue Type: Bug
> Affects Versions: 4.10.3
> Reporter: Hrishikesh Gadre
> Priority: Minor
> Attachments: SOLR-7243.patch
>
>
> We found this problem while upgrading Solr from 4.4 to 4.10.3. Our
> integration test is similar to this Solr unit test,
> https://github.com/apache/lucene-solr/blob/trunk/solr/core/src/test/org/apache/solr/schema/TestCloudSchemaless.java
> Specifically we test if the Solr server returns BAD_REQUEST when provided
> with incorrect input.The only difference is that it uses CloudSolrServer
> instead of HttpSolrServer. The CloudSolrServer always returns SERVER_ERROR
> error code. Please take a look
> https://github.com/apache/lucene-solr/blob/817303840fce547a1557e330e93e5a8ac0618f34/solr/solrj/src/java/org/apache/solr/client/solrj/impl/CloudSolrServer.java#L359
> I think we can improve the error handling by checking if the first exception
> in the list is of type SolrException and if that is the case return the error
> code associated with that exception. If the first exception is not of type
> SolrException, then we can return SERVER_ERROR code.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]