[ 
https://issues.apache.org/jira/browse/KAFKA-15373?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Michael Edgar updated KAFKA-15373:
----------------------------------
    External issue URL: https://github.com/apache/kafka/pull/14599

> 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
>            Priority: Major
>
> 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