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_r352358161
 
 

 ##########
 File path: 
pulsar-client/src/main/java/org/apache/pulsar/client/impl/BinaryProtoLookupService.java
 ##########
 @@ -251,8 +252,10 @@ private void getTopicsUnderNamespace(InetSocketAddress 
socketAddress,
         }).exceptionally((e) -> {
             long nextDelay = Math.min(backoff.next(), remainingTime.get());
             if (nextDelay <= 0) {
-                topicsFuture.completeExceptionally(new PulsarClientException
-                    .TimeoutException("Could not getTopicsUnderNamespace 
within configured timeout."));
+                topicsFuture.completeExceptionally(
+                    new PulsarClientException.TimeoutException(
+                        format("[%s] Could not getTopicsUnderNamespace within 
configured timeout",
 
 Review comment:
   It is much clear to write the error message as a sentence rather than 
putting the namespace at the beginning. Thinking from end-users' perspective, 
which one is easier to understand?
   
   "Could not get topics of namespace %s within configured timeout"

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