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


##########
plugins/idp-basic/src/main/java/org/apache/gravitino/idp/web/IdpRESTUtils.java:
##########
@@ -69,11 +69,10 @@ public static Response doAs(
 
   public static Response handleException(
       String resourceType, IdpOperationType op, String name, Exception e) {
-    String formatted = StringUtils.isBlank(name) ? "" : " [" + name + "]";
     String errorMsg =
         String.format(
-            "Failed to operate built-in IdP %s %s operation [%s], reason [%s]",
-            resourceType, formatted, op.name(), e.getMessage());
+            "Failed to operate built-in IdP %s [%s] operation [%s], reason 
[%s]",
+            resourceType, StringUtils.defaultString(name), op.name(), 
e.getMessage());

Review Comment:
   Thanks. Nice to know this point. We can use this to optimize our code.



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