roryqi commented on code in PR #10668:
URL: https://github.com/apache/gravitino/pull/10668#discussion_r3035133338


##########
iceberg/iceberg-rest-server/src/main/java/org/apache/gravitino/iceberg/service/IcebergExceptionMapper.java:
##########
@@ -71,6 +73,17 @@ public class IcebergExceptionMapper implements 
ExceptionMapper<Exception> {
           .put(ServiceUnavailableException.class, 503)
           .build();
 
+  /**
+   * Returns the HTTP status code for the given exception based on the Iceberg 
REST spec.
+   *
+   * @param ex the exception
+   * @return the HTTP status code, defaulting to 500 for unmapped exceptions
+   */
+  public static int getErrorCode(Exception ex) {

Review Comment:
   We can move the logic to IcebergRESTUtils.



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

Reply via email to