You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by GitBox <gi...@apache.org> on 2022/02/15 08:16:27 UTC

[GitHub] [pulsar] aparajita89 commented on a change in pull request #14269: Fix validateGlobalNamespaceOwnership wrap exception issue.

aparajita89 commented on a change in pull request #14269:
URL: https://github.com/apache/pulsar/pull/14269#discussion_r806559648



##########
File path: pulsar-broker/src/main/java/org/apache/pulsar/broker/web/PulsarWebResource.java
##########
@@ -796,9 +796,9 @@ protected void validateGlobalNamespaceOwnership(NamespaceName namespace) {
                     validationFuture.complete(null);
                 }
             } else {
-                String msg = String.format("Policies not found for %s namespace", namespace.toString());
+                String msg = String.format("Namespace %s not found", namespace.toString());
                 log.warn(msg);
-                validationFuture.completeExceptionally(new RestException(Status.NOT_FOUND, msg));
+                validationFuture.completeExceptionally(new RestException(Status.NOT_FOUND, "Namespace not found"));

Review comment:
       i also have the same doubt as @nodece .
   the if condition on line 773 is checking if the policies exist for the namespace. this means the namespace already exists but there are no policies. it seems like the original error message is more accurate. perhaps i am missing something?




-- 
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: commits-unsubscribe@pulsar.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org