gaoran10 commented on a change in pull request #11811:
URL: https://github.com/apache/pulsar/pull/11811#discussion_r700151835



##########
File path: 
pulsar-broker/src/main/java/org/apache/pulsar/broker/web/RestException.java
##########
@@ -75,6 +76,9 @@ private static Response getResponse(Throwable t) {
         if (t instanceof WebApplicationException) {
             WebApplicationException e = (WebApplicationException) t;
             return e.getResponse();
+        }else if(t.getCause() instanceof WebApplicationException){

Review comment:
       Please maintain the code format style.

##########
File path: pulsar-broker/src/main/resources/log4j2.xml
##########
@@ -0,0 +1,102 @@
+<?xml version="1.0" encoding="UTF-8"?>

Review comment:
       Please remove this file.

##########
File path: 
pulsar-broker/src/main/java/org/apache/pulsar/broker/web/PulsarWebResource.java
##########
@@ -961,7 +962,7 @@ public void validatePoliciesReadOnlyAccess() {
                             }
                             if (children != null && !children.isEmpty()) {
                                 checkNs.completeExceptionally(
-                                        new 
RestException(Status.PRECONDITION_FAILED, "Tenant has active namespace"));
+                                        new RestException(Status.CONFLICT, 
"The tenant still has active namespace"));

Review comment:
       It seems that this is a precondition check, maybe the error code 
`Status.PRECONDITION_FAILED` is more suitable.




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