[ https://issues.apache.org/jira/browse/NIFI-6130?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16883649#comment-16883649 ]
HondaWei commented on NIFI-6130: -------------------------------- Hi [~Max Kelada] I'll try to fix cases that you mentioned. If you have other cases, please let me know. thanks. > 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 > Priority: Major > 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 > ------------------------------------------ > (obviously not real data) > 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 also have another case where 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 real 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.14#76016)