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 03:45:00 UTC

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

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



##########
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:
       Why change this section? The old comment out looks great. If the policies is non-exist, we shouldn't throw the `Namespace %s not found`.




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