You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nifi.apache.org by mt...@apache.org on 2020/10/16 22:45:12 UTC

[nifi] branch main updated: NIFI-7935 Add reason to flow file on error

This is an automated email from the ASF dual-hosted git repository.

mthomsen pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/nifi.git


The following commit(s) were added to refs/heads/main by this push:
     new b442df5  NIFI-7935 Add reason to flow file on error
b442df5 is described below

commit b442df58e2f1270589b25ab5575101bf2f9860f3
Author: eylonronen <ey...@gmail.com>
AuthorDate: Fri Oct 16 15:38:23 2020 +0300

    NIFI-7935 Add reason to flow file on error
    
    This closes #4608
    
    Signed-off-by: Mike Thomsen <mt...@apache.org>
---
 .../org/apache/nifi/processors/elasticsearch/PutElasticsearchHttp.java   | 1 +
 1 file changed, 1 insertion(+)

diff --git a/nifi-nar-bundles/nifi-elasticsearch-bundle/nifi-elasticsearch-processors/src/main/java/org/apache/nifi/processors/elasticsearch/PutElasticsearchHttp.java b/nifi-nar-bundles/nifi-elasticsearch-bundle/nifi-elasticsearch-processors/src/main/java/org/apache/nifi/processors/elasticsearch/PutElasticsearchHttp.java
index d572b3d..21a8d2b 100644
--- a/nifi-nar-bundles/nifi-elasticsearch-bundle/nifi-elasticsearch-processors/src/main/java/org/apache/nifi/processors/elasticsearch/PutElasticsearchHttp.java
+++ b/nifi-nar-bundles/nifi-elasticsearch-bundle/nifi-elasticsearch-processors/src/main/java/org/apache/nifi/processors/elasticsearch/PutElasticsearchHttp.java
@@ -357,6 +357,7 @@ public class PutElasticsearchHttp extends AbstractElasticsearchHttpProcessor {
                                                     new Object[]{flowFile, errorReason});
                                         }
                                         flowFile = session.penalize(flowFile);
+                                        flowFile = session.putAttribute(flowFile, "reason", errorReason);
                                         session.transfer(flowFile, REL_FAILURE);
 
                                     } else {