brandboat commented on code in PR #20340:
URL: https://github.com/apache/kafka/pull/20340#discussion_r2270557784


##########
core/src/main/scala/kafka/server/AutoTopicCreationManager.scala:
##########
@@ -138,6 +138,19 @@ class DefaultAutoTopicCreationManager(
         } else if (response.versionMismatch() != null) {
           warn(s"Auto topic creation failed for ${creatableTopics.keys} with 
invalid version exception")
         } else {
+          if (response.hasResponse) {
+            response.responseBody() match {
+              case createTopicsResponse: CreateTopicsResponse =>
+                createTopicsResponse.data().topics().forEach(topicResult => {
+                  val error = Errors.forCode(topicResult.errorCode())
+                  if (error != Errors.NONE) {
+                    warn(s"Auto topic creation failed for 
${topicResult.name()} with error '${error.name()}': 
${topicResult.errorMessage()}")

Review Comment:
   tiny nit: we can skip `()` for getters
   ```suggestion
                       warn(s"Auto topic creation failed for 
${topicResult.name} with error '${error.name}': ${topicResult.errorMessage}")
   ```



-- 
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

Reply via email to