Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bugfix/Correctly display dataset upload errors #157

Merged

Conversation

Projects
None yet
3 participants
@c-w
Copy link
Contributor

commented Apr 12, 2019

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

Correctly display dataset upload errors
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](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 chakki-works:master Apr 12, 2019

2 checks passed

Travis CI - Pull Request Build Passed
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details

@c-w c-w deleted the CatalystCode:bugfix/show-error-on-data-import branch Apr 12, 2019

@icoxfog417

This comment has been minimized.

Copy link
Member

commented Apr 15, 2019

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.