thetumbled commented on code in PR #22715:
URL: https://github.com/apache/pulsar/pull/22715#discussion_r1609166384


##########
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:
   <img width="798" alt="image" 
src="https://github.com/apache/pulsar/assets/52550727/f8fc4ded-9f21-47bc-8717-0c9fe44e0e47";>
   



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