FetchFile employs the following outgoing relationships:
success | Any FlowFile that is successfully fetched from the file system will be transferred to this Relationship. |
not.found | Any FlowFile that could not be fetched from the file system because the file could not be found will be transferred to this Relationship. |
permission.denied | Any FlowFile that could not be fetched from the file system due to the user running NiFi not having sufficient permissions will be transferred to this Relationship. |
failure | Any FlowFile that could not be fetched from the file system for any reason other than insufficient permissions or the file not existing will be transferred to this Relationship. |
You could handle the non-success cases by routing the other relationship(s) back to FetchFile. Each non-success flow file will be penalized (the default is 30 seconds but is configurable). Then when processing the file no longer causes an error, it should be successfully processed and transferred to the success relationship.