tmgodinho commented on code in PR #7854:
URL: https://github.com/apache/ignite-3/pull/7854#discussion_r3081140777
##########
modules/cli/src/main/java/org/apache/ignite/internal/cli/core/exception/handler/SqlExceptionHandler.java:
##########
@@ -63,14 +63,28 @@ private static ErrorUiComponent
connectionErrUiComponent(IgniteException e) {
return fromIgniteException("Client error", e);
}
- if (e.getCause() instanceof IgniteClientConnectionException) {
- IgniteClientConnectionException cause =
(IgniteClientConnectionException) e.getCause();
+ if (e instanceof IgniteClientConnectionException) {
+ IgniteClientConnectionException cause =
(IgniteClientConnectionException) e;
InvalidCredentialsException invalidCredentialsException =
findCause(cause, InvalidCredentialsException.class);
if (invalidCredentialsException != null) {
+ var msg = invalidCredentialsException.getMessage();
+
+ String details;
+ var headerIdx = msg.indexOf('\n');
Review Comment:
I don't think they can.
Those InvalidCredentialsException always have their message set via the
constructor, and the constructor does not mark it as nullable.
Do you think it's worth to make the explicit check??
--
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]