Skip to content

Commit

Permalink
MINOR: Improve error message for invalid topic in TopicCommand (#18714)
Browse files Browse the repository at this point in the history
Reviewers: Divij Vaidya <[email protected]>
  • Loading branch information
yx9o authored Jan 30, 2025
1 parent 95abd17 commit c0b5d33
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,7 @@ private static void ensureTopicExists(List<String> foundTopics, Optional<String>
// 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()));
}
}

Expand Down

0 comments on commit c0b5d33

Please sign in to comment.