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



##########
File path: 
pulsar-broker/src/main/java/org/apache/pulsar/broker/service/ServerCnx.java
##########
@@ -1273,12 +1273,13 @@ protected void handleProducer(final CommandProducer 
cmdProducer) {
                     return null;
                 }
 
+                // Do not print stack traces for expected exceptions
                 if (cause instanceof NoSuchElementException) {
                     cause = new TopicNotFoundException("Topic Not Found.");

Review comment:
       I think we could also try to not create a 2nd exception here which is 
only used to do `getMessage()`




-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to