Technoboy- commented on code in PR #16313:
URL: https://github.com/apache/pulsar/pull/16313#discussion_r912944160


##########
pulsar-broker/src/main/java/org/apache/pulsar/broker/admin/v1/Namespaces.java:
##########
@@ -736,14 +736,20 @@ public BundlesData getBundlesData(@PathParam("property") 
String property, @PathP
             @ApiResponse(code = 412, message = "Namespace is already unloaded 
or Namespace has bundles activated")})
     public void unloadNamespace(@Suspended final AsyncResponse asyncResponse, 
@PathParam("property") String property,
             @PathParam("cluster") String cluster, @PathParam("namespace") 
String namespace) {
-        try {
-            validateNamespaceName(property, cluster, namespace);
-            internalUnloadNamespace(asyncResponse);
-        } catch (WebApplicationException wae) {
-            asyncResponse.resume(wae);
-        } catch (Exception e) {
-            asyncResponse.resume(new RestException(e));
-        }
+        validateNamespaceName(property, cluster, namespace);

Review Comment:
   Ah, because `validateNamespaceName ` will throw RestException, it's the same 
with putting it into try/catch block.
   



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