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



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

Review comment:
       Could you put a sample entity to the description of this PR to show what 
is included in the entity?

##########
File path: 
pinot-common/src/main/java/org/apache/pinot/common/utils/FileUploadDownloadClient.java
##########
@@ -509,7 +509,7 @@ private static String getErrorMessage(HttpUriRequest 
request, CloseableHttpRespo
     StatusLine statusLine = response.getStatusLine();
     String reason;
     try {
-      reason = 
JsonUtils.stringToJsonNode(EntityUtils.toString(response.getEntity())).get("error").asText();
+      reason = 
JsonUtils.stringToJsonNode(EntityUtils.toString(response.getEntity())).get("_error").asText();
     } catch (Exception e) {
       reason = "Failed to get reason";

Review comment:
       Could we also print out some useful info like the raw output if any 
exception is throw when parsing the entity?




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