mirror of https://github.com/apache/kafka.git
MINOR: Improve error message for invalid topic in TopicCommand (#18714)
Reviewers: Divij Vaidya <diviv@amazon.com>
This commit is contained in:
parent
95abd174c7
commit
c0b5d3334a
|
@ -210,7 +210,7 @@ public abstract class TopicCommand {
|
|||
// If no topic name was mentioned, do not need to throw exception.
|
||||
if (requestedTopic.isPresent() && !requestedTopic.get().isEmpty() && requireTopicExists && foundTopics.isEmpty()) {
|
||||
// If given topic doesn't exist then throw exception
|
||||
throw new IllegalArgumentException(String.format("Topic '%s' does not exist as expected", requestedTopic));
|
||||
throw new IllegalArgumentException(String.format("Topic '%s' does not exist as expected", requestedTopic.get()));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue