[
https://issues.apache.org/jira/browse/SOLR-1503?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12764312#action_12764312
]
Kyle Maxwell commented on SOLR-1503:
------------------------------------
Patch below, as Jira file upload is not working for me:
--- src/java/org/apache/solr/handler/XMLLoader.java (revision 823788)
+++ src/java/org/apache/solr/handler/XMLLoader.java (working copy)
@@ -70,7 +70,7 @@
}
catch (XMLStreamException e) {
//Hmmm, not quite right
- throw (IOException) new IOException(e.getMessage()).initCause(e);
+ throw new SolrException(SolrException.ErrorCode.BAD_REQUEST,
e.getMessage(), e);
} finally {
IOUtils.closeQuietly(reader);
}
> Solr throws 500 instead of 400 on some malformed requests
> ---------------------------------------------------------
>
> Key: SOLR-1503
> URL: https://issues.apache.org/jira/browse/SOLR-1503
> Project: Solr
> Issue Type: Bug
> Components: update
> Affects Versions: 1.3
> Reporter: Kyle Maxwell
> Priority: Minor
> Original Estimate: 1h
> Remaining Estimate: 1h
>
> If you submit a malformed xml document to update, Solr returns a 500 error.
> Clients often treat this as a failure in the server, but it's really a 400
> invalid request. Trivial patch is attached, although there may be similar
> cases (i.e. malformed json) that are also worth investigating.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.