SOLR-6751: Analysis errors should return BAD_REQUEST, not SERVER_ERROR

git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1641586 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Alan Woodward 2014-11-25 11:42:31 +00:00
parent ebb9a5d971
commit 63867cb7ce
2 changed files with 4 additions and 1 deletions

View File

@ -417,6 +417,9 @@ Other Changes
* SOLR-6754: ZkController.publish doesn't use the updateLastState parameter.
(shalin)
* SOLR-6751: Exceptions thrown in the analysis chain in DirectUpdateHandler2
should return a BAD_REQUEST status (Alan Woodward)
================== 4.10.3 ==================
Bug Fixes

View File

@ -165,7 +165,7 @@ public class DirectUpdateHandler2 extends UpdateHandler implements SolrCoreState
} catch (SolrException e) {
throw e;
} catch (RuntimeException t) {
throw new SolrException(SolrException.ErrorCode.SERVER_ERROR,
throw new SolrException(SolrException.ErrorCode.BAD_REQUEST,
String.format(Locale.ROOT, "Exception writing document id %s to the index; possible analysis error.",
cmd.getPrintableId()), t);
}