m1a2st commented on code in PR #19027: URL: https://github.com/apache/kafka/pull/19027#discussion_r1970719030
########## clients/src/main/java/org/apache/kafka/common/requests/UnregisterBrokerRequest.java: ########## @@ -57,7 +57,8 @@ public UnregisterBrokerResponse getErrorResponse(int throttleTimeMs, Throwable e Errors error = Errors.forException(e); return new UnregisterBrokerResponse(new UnregisterBrokerResponseData() .setThrottleTimeMs(throttleTimeMs) - .setErrorCode(error.code())); + .setErrorCode(error.code()) + .setErrorMessage(error.message() + ", " + e.getMessage())); Review Comment: My idea is to provide error code-related messages first, followed by the exception's stack trace. This way, users can better understand the issue. However, if I only provide `e.getMessage()`, the amount of information should still be sufficient. -- 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