singhpk234 commented on code in PR #14927:
URL: https://github.com/apache/iceberg/pull/14927#discussion_r2646148612


##########
core/src/main/java/org/apache/iceberg/rest/ErrorHandlers.java:
##########
@@ -297,7 +297,9 @@ public void accept(ErrorResponse error) {
           throw new ServiceUnavailableException("Service unavailable: %s", 
error.message());
       }
 
-      throw new RESTException("Unable to process: %s", error.message());
+      throw new RESTException(

Review Comment:
   while we are here can we also add error code and type in 
   
https://github.com/apache/iceberg/blob/0651b8913d27c3b1c9aca4a9609bec521905fb36/core/src/main/java/org/apache/iceberg/rest/ErrorHandlers.java#L239



##########
core/src/main/java/org/apache/iceberg/rest/ErrorHandlers.java:
##########
@@ -297,7 +297,9 @@ public void accept(ErrorResponse error) {
           throw new ServiceUnavailableException("Service unavailable: %s", 
error.message());
       }
 
-      throw new RESTException("Unable to process: %s", error.message());
+      throw new RESTException(
+          "Unable to process (code: %s, type: %s): %s",
+          error.code(), error.type() != null ? error.type() : "unknown", 
error.message());

Review Comment:
   i wonder if making the null as unknown adds more value ? how about just 
having error.type() ?



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