NIFI-7935 Add reason to flow file on error

This closes #4608

Signed-off-by: Mike Thomsen <mthomsen@apache.org>
This commit is contained in:
eylonronen 2020-10-16 15:38:23 +03:00 committed by Mike Thomsen
parent 4a370eae8c
commit b442df58e2
No known key found for this signature in database
GPG Key ID: 88511C3D4CAD246F
1 changed files with 1 additions and 0 deletions

View File

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