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


##########
nifi-extension-bundles/nifi-jolt-bundle/nifi-jolt-processors/src/main/java/org/apache/nifi/processors/jolt/AbstractJoltTransform.java:
##########
@@ -190,7 +190,15 @@ protected Collection<ValidationResult> 
customValidate(ValidationContext validati
                     }
                 }
             } catch (final Exception e) {
-                String message = String.format("Specification not valid for 
the selected transformation: %s", e.getMessage());
+                final String reason;
+                final Throwable cause = e.getCause();
+                if (cause == null) {
+                    reason = e.getMessage();
+                } else {
+                    reason = "%s [%s]".formatted(cause.getMessage(), 
e.getMessage());
+                }
+
+                final String message = "Specification not valid... 
%s".formatted(reason);

Review Comment:
   ```suggestion
                   final String message = "Specification not valid: 
%s".formatted(reason);
   ```



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