cmccabe commented on a change in pull request #11416: URL: https://github.com/apache/kafka/pull/11416#discussion_r761495515
########## File path: metadata/src/main/java/org/apache/kafka/controller/ReplicationControlManager.java ########## @@ -388,7 +389,12 @@ public void replay(RemoveTopicRecord record) { Map<String, CreatableTopicResult> successes = new HashMap<>(); for (CreatableTopic topic : request.topics()) { if (topicErrors.containsKey(topic.name())) continue; - ApiError error = createTopic(topic, records, successes); + ApiError error; + try { + error = createTopic(topic, records, successes); Review comment: The try...catch is needed for cases where an unexpected exception is thrown. I agree that this could be refactored to just be exception-based. But let's do that in a follow-on since this change is already big enough... -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: jira-unsubscr...@kafka.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org