mafintosh / mafintosh/csv-parser
Error handling
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 1.5k
- Forks
- 143
- PR merge metrics
- No merged PRs in 30d
Description
### Feature Proposal
As far as I know if csv-parser encounters an error it silently stops on that row, while parsing all the previouse lines. Not knowing this I got far into a project and realized not all my rows were returning by reviewing the row count. I propose an on('error') method so that we can be aware of and handle these errors. After removing the problem line my whole CSV would parse.
### Feature Use Case
Better error feedback and no swallowing of errors.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by locating the JavaScript parser entry point and its current handling of malformed CSV rows. Confirm the existing behavior with a focused test, then define completion as malformed input notifying consumers through an error event instead of being silently skipped, with coverage for the reported case.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- data-engineering
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100