chia7712 commented on a change in pull request #10141:
URL: https://github.com/apache/kafka/pull/10141#discussion_r577570241



##########
File path: 
clients/src/main/java/org/apache/kafka/clients/admin/KafkaAdminClient.java
##########
@@ -1887,7 +1887,11 @@ void handleResponse(AbstractResponse abstractResponse) {
                     KafkaFutureImpl<TopicDescription> future = 
entry.getValue();
                     Errors topicError = errors.get(topicName);
                     if (topicError != null) {
-                        future.completeExceptionally(topicError.exception());
+                        if (topicError == Errors.UNKNOWN_TOPIC_OR_PARTITION) {
+                            future.completeExceptionally(new 
UnknownTopicOrPartitionException("Topic " + topicName + " not found."));

Review comment:
       How about using `topicError.exception("Topic " + topicName + " not 
found.")`




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


Reply via email to