Add Error handling for file input
Opened this issue · 0 comments
talolard commented
Currently we support adding files but there is no error handling. Things to handle
- Restrict file types to JSON CSV and TSV
- Display error message when there is an error parsing the JSON (e.g it is invalid)
- Display an error message when the JSON is not supported (we expect a JSON array of objects)
- Warn about CSV parsing errors from papa parse
- Prevent the app from crashing when there is an error (currently there is no error handling at all)
Relevnt file is https://github.com/LightTag/ylabel/blob/master/src/data/components/input/fileInput.js