yuruguo commented on a change in pull request #13393:
URL: https://github.com/apache/pulsar/pull/13393#discussion_r772068978



##########
File path: 
pulsar-broker/src/main/java/org/apache/pulsar/broker/admin/impl/NamespacesBase.java
##########
@@ -999,12 +999,9 @@ protected BookieAffinityGroupData 
internalGetBookieAffinityGroup() {
             final BookieAffinityGroupData bookkeeperAffinityGroup = 
getLocalPolicies().getLocalPolicies(namespaceName)
                     .orElseThrow(() -> new RestException(Status.NOT_FOUND,
                             "Namespace local-policies does not 
exist")).bookieAffinityGroup;
-            if (bookkeeperAffinityGroup == null) {
-                throw new RestException(Status.NOT_FOUND, "bookie-affinity 
group does not exist");

Review comment:
       It is similar to this 
[PR](https://github.com/apache/pulsar/pull/13237#issue-1077409702), we should 
return `null` instead of `RestException`.




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