thomas-bousquet commented on code in PR #22715:
URL: https://github.com/apache/pulsar/pull/22715#discussion_r2201670345


##########
pulsar-broker/src/main/java/org/apache/pulsar/broker/admin/AdminResource.java:
##########
@@ -506,6 +507,18 @@ protected void validateClusterExists(String cluster) {
         }
     }
 
+    protected CompletableFuture<Void> validateNamespaceExists(NamespaceName 
namespace) {
+        try {
+            if (namespaceResources().namespaceExists(namespace)) {
+                return CompletableFuture.completedFuture(null);
+            } else {
+                return FutureUtil.failedFuture(new 
RestException(Status.NOT_FOUND, "Namespace does not exist"));
+            }
+        } catch (Exception e) {
+            return FutureUtil.failedFuture(e);
+        }
+    }
+

Review Comment:
   Is it possible the same issue is present when the tenant does not exist as 
well?



-- 
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-unsubscr...@pulsar.apache.org

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

Reply via email to