showuon commented on code in PR #15280:
URL: https://github.com/apache/kafka/pull/15280#discussion_r1469542360


##########
clients/src/main/java/org/apache/kafka/common/security/scram/internals/ScramSaslServer.java:
##########
@@ -143,7 +143,7 @@ public byte[] evaluateResponse(byte[] response) throws 
SaslException, SaslAuthen
                     } catch (SaslException | AuthenticationException e) {
                         throw e;
                     } catch (Throwable e) {
-                        throw new SaslException("Authentication failed: 
Credentials could not be obtained", e);
+                        throw new SaslException("Authentication failed: 
Credentials could not be obtained" + (username == null ? "" : " for user " + 
username), e);

Review Comment:
   From the point the below, we're unsure if `username` is already set or not, 
so only print it when username has value.



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to