sijie commented on a change in pull request #5714: Add more info in the error 
messages
URL: https://github.com/apache/pulsar/pull/5714#discussion_r352358248
 
 

 ##########
 File path: 
pulsar-client/src/main/java/org/apache/pulsar/client/impl/ConsumerImpl.java
 ##########
 @@ -301,11 +301,17 @@ public UnAckedMessageTracker getUnAckedMessageTracker() {
             }).exceptionally(e -> {
                 log.error("[{}][{}] Failed to unsubscribe: {}", topic, 
subscription, e.getCause().getMessage());
                 setState(State.Ready);
-                unsubscribeFuture.completeExceptionally(e.getCause());
+                unsubscribeFuture.completeExceptionally(
+                    new PulsarClientException.WrapperException(
+                        String.format("[%s][%s] Failed to unsubscribe", 
topicName.toString(), subscription),
+
+                        e.getCause()));
                 return null;
             });
         } else {
-            unsubscribeFuture.completeExceptionally(new 
PulsarClientException("Not connected to broker"));
+            unsubscribeFuture.completeExceptionally(
+                new PulsarClientException(
 
 Review comment:
   "Client is not connected to broker when unsubscribing subscription %s of 
topic %s"

----------------------------------------------------------------
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:
us...@infra.apache.org


With regards,
Apache Git Services

Reply via email to