sijie commented on a change in pull request #4779:  Add basic authentication 
capabilities to Pulsar SQL
URL: https://github.com/apache/pulsar/pull/4779#discussion_r306102284
 
 

 ##########
 File path: 
pulsar-sql/presto-pulsar/src/main/java/org/apache/pulsar/sql/presto/PulsarSplitManager.java
 ##########
 @@ -143,6 +148,10 @@ ManagedLedgerFactory getManagedLedgerFactory() throws 
Exception {
         try {
             numPartitions = 
(this.pulsarAdmin.topics().getPartitionedTopicMetadata(topicName.toString())).partitions;
         } catch (PulsarAdminException e) {
+            if (e.getStatusCode() == 401) {
+                throw new PrestoException(QUERY_REJECTED, "Unauthorized");
 
 Review comment:
   Can you improve the error message? For example, adding the topic name to the 
error message.

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


With regards,
Apache Git Services

Reply via email to