munendrasn commented on a change in pull request #2121:
URL: https://github.com/apache/lucene-solr/pull/2121#discussion_r539029723
##########
File path:
solr/core/src/java/org/apache/solr/update/processor/AtomicUpdateDocumentMerger.java
##########
@@ -553,7 +574,15 @@ private Object getNativeFieldValue(String fieldName,
Object val) {
return val;
}
SchemaField sf = schema.getField(fieldName);
- return sf.getType().toNativeType(val);
+ try {
+ return sf.getType().toNativeType(val);
+ } catch (SolrException ex) {
+ throw new SolrException(SolrException.ErrorCode.getErrorCode(ex.code()),
+ "Error converting field '" + sf.getName() + "'='" +val+"' to native
type, msg=" + ex.getMessage(), ex);
Review comment:
cause gets lost in the metadata section of the response so, thought this
would give simpler insight into error. Also, trying to follow the same
convention as other error messages in DocumentBuilder
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]