amogh-jahagirdar commented on code in PR #16024:
URL: https://github.com/apache/iceberg/pull/16024#discussion_r3163797478


##########
core/src/main/java/org/apache/iceberg/rest/responses/PlanTableScanResponseParser.java:
##########
@@ -98,6 +103,11 @@ public static PlanTableScanResponse fromJson(
         "Cannot parse planTableScan response from empty or null object");
 
     PlanStatus planStatus = PlanStatus.fromName(JsonUtil.getString(STATUS, 
json));
+    ErrorResponse errorResponse = null;
+    if (json.has(ERROR) && json.get(ERROR).isObject()) {

Review Comment:
   If it's not an object it violates the spec but I think the implementation 
being more robust like it is here makes a lot of sense, so +1 on how it's 
handled. It already failed so no need to blow up the parsing of the error; we 
may as well have the failure later on in the state tracking of the scan 
planning with the clearer error message. 



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