markap14 commented on a change in pull request #4280:
URL: https://github.com/apache/nifi/pull/4280#discussion_r426796947



##########
File path: 
nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/java/org/apache/nifi/processors/standard/QueryRecord.java
##########
@@ -396,7 +396,7 @@ public void process(final OutputStream out) throws 
IOException {
             session.remove(createdFlowFiles);
             session.transfer(original, REL_FAILURE);
         } catch (final Exception e) {
-            getLogger().error("Unable to query {} due to {}", new Object[] 
{original, e});
+            getLogger().error("Unable to query {} due to {}", new Object[] 
{original, e.getCause() == null ? e : e.getCause()});

Review comment:
       I don't think we want to be getting the 'cause' for the general 
Exception - we should log the exception itself. We get the cause for 
SQLException only because we know that it's generally wrapping another 
exception.




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

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


Reply via email to