Skip to content

Bugfix/Correctly display dataset upload errors - #157

Merged
Hironsan merged 1 commit into
doccano:masterfrom
CatalystCode:bugfix/show-error-on-data-import
Apr 12, 2019
Merged

Bugfix/Correctly display dataset upload errors#157
Hironsan merged 1 commit into
doccano:masterfrom
CatalystCode:bugfix/show-error-on-data-import

Conversation

@c-w

@c-w c-w commented Apr 12, 2019

Copy link
Copy Markdown
Member

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 #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

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 doccano#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)
@Hironsan
Hironsan merged commit f0bf653 into doccano:master Apr 12, 2019
@c-w
c-w deleted the bugfix/show-error-on-data-import branch April 12, 2019 15:23
@icoxfog417

Copy link
Copy Markdown
Contributor

Thanks! Additionally, I made the checklist for the same situation.

@kuraga

kuraga commented Dec 26, 2019

Copy link
Copy Markdown
Contributor

Does I correctly understand that issue is actual, again?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants