Nimrod Avni created NIFI-6130: --------------------------------- Summary: Add More information about exceptions from record readers/writers Key: NIFI-6130 URL: https://issues.apache.org/jira/browse/NIFI-6130 Project: Apache NiFi Issue Type: Improvement Affects Versions: 1.9.0 Reporter: Nimrod Avni Attachments: image-2019-03-18-21-46-22-468.png, image-2019-03-18-21-47-16-888.png
When using record readers and writers i ran into a problem where i tried to give it a CSV with the same header twice, i.e something like ------------------------------------------ header1,header2,header1 a,b,c ------------------------------------------ when the reader tried to parse the flowfile as records it threw this error: "Failed to read Header line from CSV" Which is not very indicative, when i went ahead and debugged the source code i could see the real error is: java.lang.IllegalArgumentException: The header contains a duplicate name: "header1" in [header1, header2, header1] (Pictures are provided) This is a case i ran into recently, i have tried to read an avro file which has a '#' (hashtag) character in one of the headers, which is illegal in the avro schema defenition. but the error i got there was : "failed to parse incoming data", and again, when i debugged the code i found the read error what the main point is to give a more indicative error message for record readers / writers, which not only gives the error itself but its cause i could probably look up many more reasons readers / writers could fail and they will not give a good error message, but i believe these 2 are fine as an example -- This message was sent by Atlassian JIRA (v7.6.3#76005)