jackjlli commented on a change in pull request #7812:
URL: https://github.com/apache/pinot/pull/7812#discussion_r754666677



##########
File path: 
pinot-common/src/main/java/org/apache/pinot/common/utils/FileUploadDownloadClient.java
##########
@@ -543,9 +543,10 @@ private static String getErrorMessage(HttpUriRequest 
request, CloseableHttpRespo
     StatusLine statusLine = response.getStatusLine();
     String reason;
     try {
-      reason = 
JsonUtils.stringToJsonNode(EntityUtils.toString(response.getEntity())).get("_error").asText();
+      String entityStr = EntityUtils.toString(response.getEntity());
+      reason = JsonUtils.stringToObject(entityStr, 
SimpleHttpErrorInfo.class).getError();

Review comment:
       Have we considered backward compatibility here since the server and 
client may not use the same version at all times (e.g. during deployment)?

##########
File path: 
pinot-controller/src/main/java/org/apache/pinot/controller/api/resources/WebApplicationExceptionMapper.java
##########
@@ -25,6 +25,7 @@
 import javax.ws.rs.core.Response;
 import javax.ws.rs.ext.ExceptionMapper;
 import javax.ws.rs.ext.Provider;
+import org.apache.pinot.common.utils.SimpleHttpErrorInfo;

Review comment:
       You might need to remove the imports of JsonCreator and JsonProperty in 
this class.




-- 
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]

Reply via email to