adityamukho commented on code in PR #6478:
URL: https://github.com/apache/ignite-3/pull/6478#discussion_r2302825838
##########
modules/cluster-management/src/main/java/org/apache/ignite/internal/cluster/management/ClusterInitializer.java:
##########
@@ -292,7 +293,7 @@ private CompletableFuture<Void>
invokeMessage(Collection<ClusterNode> nodes, Net
var errorResponse = (InitErrorMessage)
response;
throw new InternalInitException(
- String.format("Got error response from
node \"%s\": %s", node.name(), errorResponse.cause()),
+
Optional.ofNullable(errorResponse.cause()).orElse(""),
Review Comment:
> Well, you call LOG.warn and it will print the message in the server logs =)
ok
> I don't understand, there are two similar messages in two branches of the
same if statement....
I could do something like this:
```java
else if (!(response instanceof InitCompleteMessage || response instanceof
PrepareInitCompleteMessage)) {
LOG.warn("Unexpected response from node \"{}\": {}", node.name(),
response.getClass());
throw new InternalInitException(String.format("Unexpected error: %s",
response.getClass()), true);
}
```
However, this too exposes an internal class name to the CLI. Is this ok? If
not, what should the message be?
--
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]