Michael Edgar created KAFKA-15373:
-------------------------------------

             Summary: AdminClient#describeTopics should not throw 
InvalidTopicException if topic ID is not found
                 Key: KAFKA-15373
                 URL: https://issues.apache.org/jira/browse/KAFKA-15373
             Project: Kafka
          Issue Type: Bug
    Affects Versions: 3.5.1
            Reporter: Michael Edgar


Similar to KAFKA-7808.

In {{KafkaAdminClient#handleDescribeTopicsByIds}}, when the topic is not found 
by ID, an {{InvalidTopicException}} is thrown.

{code:java}
String topicName = cluster.topicName(topicId);
if (topicName == null) {
    future.completeExceptionally(new InvalidTopicException("TopicId " + topicId 
+ " not found."));
    continue;
}
{code}

It would be better to use an {{UnknownTopicIdException}} in this case, which 
better aligns to the use of {{UnknownTopicOrPartitionException}} for the same 
scenario when describing topics by name.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to