exceptionfactory commented on code in PR #10101:
URL: https://github.com/apache/nifi/pull/10101#discussion_r2217474287


##########
nifi-framework-bundle/nifi-framework/nifi-framework-cluster-protocol/src/main/java/org/apache/nifi/cluster/protocol/AbstractNodeProtocolSender.java:
##########
@@ -156,6 +158,23 @@ public ClusterWorkloadResponseMessage 
clusterWorkload(final ClusterWorkloadReque
         throw new ProtocolException("Expected message type '" + 
MessageType.CLUSTER_WORKLOAD_RESPONSE + "' but found '" + 
responseMessage.getType() + "'");
     }
 
+    @Override
+    public NodeStatusesResponseMessage nodeStatuses(final 
NodeStatusesRequestMessage msg) throws ProtocolException {
+        final InetSocketAddress serviceAddress;
+        try {
+            serviceAddress = getServiceAddress();
+        } catch (IOException e) {
+            throw new ProtocolException("Failed to getServiceAddress due to " 
+ e, e);

Review Comment:
   Although the `due to` approach with concatenated Exception.toString() still 
exists in some places, it is unnecessarily repetitive, since the Exception 
stack trace includes all those details.
   ```suggestion
               throw new ProtocolException("Failed to get Service Address", e);
   ```



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