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

Import from JSON with missing field results in CLI tool hanging #126

Closed
phacts opened this issue Mar 1, 2019 · 0 comments
Closed

Import from JSON with missing field results in CLI tool hanging #126

phacts opened this issue Mar 1, 2019 · 0 comments

Comments

@phacts
Copy link

phacts commented Mar 1, 2019

Expected Behavior

I normally get a 422 when there's some sort of mismatch or invalid content between my JSON file and the content model in contentful.

Actual Behavior

When I include a JSON file that has a field that is NOT in the contentful model, I end up in an infinite loop during the "Importing Content" phase, which results in various API rate limit errors, but NO 422 describing the problem.

Possible Solution

Just handle the error case where I import data that has fields that don't exist in contentful by throwing a 422 and making sure that gets back to the CLI tool.

Steps to Reproduce

Create a content model, create a JSON file to import into it, and run the import with --skip-model. As long as your JSON file has an EXTRA field not found on your content model, you will notice it hang and fail to report back errors.

Environment

node version 10.15.0
npm version 6.8.0
contentful CLI version 0.20.0

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

No branches or pull requests

2 participants