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


##########
core/src/main/java/org/apache/iceberg/rest/RESTTableScan.java:
##########
@@ -323,14 +323,19 @@ private CloseableIterable<FileScanTask> 
fetchPlanningResult() {
   }
 
   private static String failureMessage(String planId, ErrorResponse error) {
-    Preconditions.checkArgument(error != null, "Error must be present for 
failed status");
+    // Be lenient when reading: the spec requires an error payload with a 
FAILED status, but
+    // if a server violates that, still surface a meaningful message rather 
than throwing on
+    // top of an already-broken response.

Review Comment:
   Bit shorter?:
   // If a FAILED response lacks the expected error payload, 
   // still return a useful error message instead of throwing.



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