ivandika3 commented on code in PR #7195:
URL: https://github.com/apache/ozone/pull/7195#discussion_r1760441667


##########
hadoop-ozone/s3gateway/src/main/java/org/apache/hadoop/ozone/s3/util/S3Utils.java:
##########
@@ -116,4 +118,11 @@ public static S3StorageType toS3StorageType(String 
storageType)
       throw newError(INVALID_ARGUMENT, storageType, ex);
     }
   }
+
+  public static WebApplicationException wrapOS3Exception(OS3Exception ex) {
+    return new WebApplicationException(ex.getErrorMessage(), ex,
+        Response.status(ex.getHttpCode())
+            .entity(ex.toXml())
+            .build());
+  }

Review Comment:
   Nit: `AuthorizationFilter` also seems to use the same method, we can also 
replace the `wrapOS3Exception` in `AuthorizationFilter` with this.



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