lhotari commented on code in PR #19412:
URL: https://github.com/apache/pulsar/pull/19412#discussion_r1095944448


##########
pulsar-broker-common/src/main/java/org/apache/pulsar/broker/authorization/PulsarAuthorizationProvider.java:
##########
@@ -140,7 +140,7 @@ public CompletableFuture<Boolean> canConsumeAsync(TopicName 
topicName, String ro
                 }).exceptionally(ex -> {
                     log.warn("Client with Role - {} failed to get permissions 
for topic - {}. {}", role, topicName,
                             ex.getMessage());
-                    return null;
+                    throw FutureUtil.wrapToCompletionException(ex);

Review Comment:
   Is the logging just extra noise if the exception gets rethrown?  Could we 
remove the `.exceptionally` completely?
   
   I guess `return null;` is wrong and could be `return false;` if the desire 
is to just log and continue by returning `false`.



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