laserninja commented on code in PR #10673:
URL: https://github.com/apache/gravitino/pull/10673#discussion_r3067550252


##########
iceberg/iceberg-rest-server/src/main/java/org/apache/gravitino/iceberg/service/IcebergExceptionMapper.java:
##########
@@ -97,6 +99,9 @@ public static int getErrorCode(Exception ex) {
    */
   public static Exception convertToIcebergException(Exception e) {
     String message = e.getMessage() != null ? e.getMessage() : "";
+    if (e instanceof TokenExpiredException) {
+      return e;

Review Comment:
   Sounds good. I've created `AuthenticationTimeoutException extends 
RESTException' in the iceberg-rest-server module (the Iceberg SDK doesn't ship 
this class despite it being part of the REST spec). 
IcebergExceptionMapper.convertToIcebergException() now converts 
TokenExpiredException → 'AuthenticationTimeoutException', so only the Iceberg 
exception type reaches the HTTP response.



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