merlimat commented on a change in pull request #7523:
URL: https://github.com/apache/pulsar/pull/7523#discussion_r627769234



##########
File path: 
pulsar-broker/src/main/java/org/apache/pulsar/broker/lookup/TopicLookupBase.java
##########
@@ -126,14 +128,17 @@ protected void internalLookupTopicAsync(TopicName 
topicName, boolean authoritati
 
     private void validateAdminAndClientPermission(TopicName topic) throws 
RestException, Exception {
         try {
-            validateAdminAccessForTenant(topic.getTenant());
+            validateTopicOperation(topic, TopicOperation.LOOKUP);
         } catch (Exception e) {
-            checkConnect(topic);
+            // unknown error marked as internal server error
+            log.warn("Unexpected error while authorizing 
TopicOperation.LOOKUP. topic={}, role={}. Error: {}",

Review comment:
       Do we need to log here? The exception would be expected if the client is 
not authorized and since it's already bubbled up, we would end up logging that 
twice.




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

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to