jerqi commented on code in PR #6515:
URL: https://github.com/apache/gravitino/pull/6515#discussion_r1973021733


##########
authorizations/authorization-ranger/src/main/java/org/apache/gravitino/authorization/ranger/RangerAuthorizationPlugin.java:
##########
@@ -273,8 +273,13 @@ public Boolean onRoleDeleted(Role role) throws 
AuthorizationPluginException {
       rangerClient.deleteRole(
           rangerHelper.generateGravitinoRoleName(role.name()), 
rangerAdminName, rangerServiceName);
     } catch (RangerServiceException e) {
-      // Ignore exception to support idempotent operation
-      LOG.warn("Ranger delete role: {} failed!", role, e);
+      if (e.getMessage().contains("No RangerRole found for name")) {

Review Comment:
   > Maybe try `e.getStatus()` ?
   
   The status is 400. It includes many other errors which shouldn't be ignored.



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