dsmiley commented on code in PR #1657:
URL: https://github.com/apache/solr/pull/1657#discussion_r3408883937
##########
solr/solrj/src/java/org/apache/solr/client/solrj/impl/HttpSolrClientBase.java:
##########
@@ -224,57 +220,26 @@ protected NamedList<Object> processErrorsAndResponse(
try {
rsp = processor.processResponse(is, encoding);
} catch (Exception e) {
- throw new SolrClient.RemoteSolrException(
- urlExceptionMessage, httpStatus, e.getMessage(), e);
+ throw new RemoteSolrException(urlExceptionMessage, httpStatus,
e.getMessage(), e);
}
Object error = rsp == null ? null : rsp.get("error");
-
- if (error != null
- && (String.valueOf(getObjectByPath(error, true, errPath))
- .endsWith("ExceptionWithErrObject"))) {
- throw RemoteExecutionException.create(urlExceptionMessage, rsp);
+ if (error != null && isV2Api) {
Review Comment:
why make this conditional on isV2Api? If somehow we parse an "error", let's
throw.
##########
solr/solrj/src/java/org/apache/solr/client/solrj/impl/HttpSolrClientBase.java:
##########
@@ -224,57 +220,26 @@ protected NamedList<Object> processErrorsAndResponse(
try {
rsp = processor.processResponse(is, encoding);
} catch (Exception e) {
- throw new SolrClient.RemoteSolrException(
- urlExceptionMessage, httpStatus, e.getMessage(), e);
+ throw new RemoteSolrException(urlExceptionMessage, httpStatus,
e.getMessage(), e);
}
Object error = rsp == null ? null : rsp.get("error");
-
- if (error != null
- && (String.valueOf(getObjectByPath(error, true, errPath))
- .endsWith("ExceptionWithErrObject"))) {
- throw RemoteExecutionException.create(urlExceptionMessage, rsp);
+ if (error != null && isV2Api) {
+ throw new RemoteSolrException(urlExceptionMessage, httpStatus, error,
true);
Review Comment:
the `true` inserted here means skipRetry, which isn't present for the other
RSE usages in this class. Why skipRetry here, gated specifically by isV2Api?
--
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]