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



##########
File path: 
pulsar-broker-common/src/main/java/org/apache/pulsar/broker/authorization/PulsarAuthorizationProvider.java
##########
@@ -126,7 +125,7 @@ public void initialize(ServiceConfiguration conf, 
ConfigurationCacheService conf
                             PulsarServerException ex = new 
PulsarServerException(
                                     String.format("%s is not authorized to 
access subscription %s on topic %s", role,
                                             subscription, topicName));
-                            permissionFuture.complete(false);
+                            permissionFuture.completeExceptionally(ex);

Review comment:
       Good catch. I think the exception is useless here. We should be 
completing the future with `false` and avoid creating the exception altogether.




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