mirror of https://github.com/doccano/doccano.git
Browse Source
When importing an invalid CSV file that fails data validation, the API returns the errors wrapped in an array. The current frontend code does not handle this case and does not display the errors which can be confusing for users as for example seen in https://github.com/chakki-works/doccano/issues/150. This change modifies the frontend code to handle error responses wrapped in an array. The code was tested by uploading the following CSV file: ``` text,label "","label1" ``` After applying the change, we now correctly render the upload error as shown in the screenshot below: [![Screenshot showing dataset upload error response](https://user-images.githubusercontent.com/1086421/56042132-504f3300-5d08-11e9-8ddf-04c8deb2f60b.png)](https://user-images.githubusercontent.com/1086421/56042132-504f3300-5d08-11e9-8ddf-04c8deb2f60b.png)pull/157/head
Clemens Wolff
5 years ago
1 changed files with 16 additions and 10 deletions
Loading…