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



##########
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:
       Yeah unfortunately for this processor, when an Exception is thrown it's 
kind of difficult to figure out without the logs. But if we were to unwrap the 
cause, that could make even the logs confusing, which is even worse.




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