You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jira@kafka.apache.org by "Michael Edgar (Jira)" <ji...@apache.org> on 2023/08/17 15:29:00 UTC
[jira] [Created] (KAFKA-15373) AdminClient#describeTopics should not throw InvalidTopicException if topic ID is not found
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)