Linsiyuan9 commented on code in PR #17930:
URL: https://github.com/apache/kafka/pull/17930#discussion_r1916625671


##########
raft/src/main/java/org/apache/kafka/raft/RaftUtil.java:
##########
@@ -546,8 +546,11 @@ public static AddRaftVoterResponseData addVoterResponse(
         Errors error,
         String errorMessage
     ) {
-        errorMessage = errorMessage == null ? error.message() : errorMessage;
-
+        if (errorMessage == null) {
+            errorMessage = !Errors.NONE.equals(error) ? error.message() : null;
+        } else if (Errors.NONE.equals(error)) {
+            errorMessage = null;
+        }

Review Comment:
   hi @ahuang98  sorry for always replying late, my foundation is not so solid.
   I have made changes.



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