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

Add structured error for VALIDATION_ERROR action #12050

Closed
stefanprobst opened this issue Feb 24, 2019 · 4 comments
Closed

Add structured error for VALIDATION_ERROR action #12050

stefanprobst opened this issue Feb 24, 2019 · 4 comments
Labels
help wanted Issue with a clear description that the community can help with. status: confirmed Issue with steps to reproduce the bug that’s been verified by at least one reviewer. type: bug An issue or pull request relating to a bug in Gatsby

Comments

@stefanprobst
Copy link
Contributor

stefanprobst commented Feb 24, 2019

In the createNode action creator, when a node fails Joi validation, we dispatch a VALIDATION_ERROR action, but we don't handle it anywhere at the moment.

We probably want to handle this and warn using reporter.warn

@freiksenet freiksenet added type: bug An issue or pull request relating to a bug in Gatsby status: confirmed Issue with steps to reproduce the bug that’s been verified by at least one reviewer. labels Feb 25, 2019
@gatsbot gatsbot bot added the stale? Issue that may be closed soon due to the original author not responding any more. label Mar 18, 2019
@stefanprobst stefanprobst added 🎯Ecosystem not stale and removed stale? Issue that may be closed soon due to the original author not responding any more. 🎯Ecosystem labels Mar 18, 2019
@stefanprobst
Copy link
Contributor Author

Related: gatsbyjs/rfcs#31

@sidharthachatterjee sidharthachatterjee changed the title VALIDATION_ERROR action not handled Add structured error for VALIDATION_ERROR action Oct 18, 2019
@sidharthachatterjee sidharthachatterjee added Hacktoberfest help wanted Issue with a clear description that the community can help with. labels Oct 18, 2019
@gatsbyjs gatsbyjs deleted a comment from gatsbot bot Oct 18, 2019
@samrae7
Copy link
Contributor

samrae7 commented Oct 18, 2019

Hi I would like to take this on

@samrae7
Copy link
Contributor

samrae7 commented Oct 18, 2019

I have noticed that since the issue was created, there is now some error handling added: https://github.com/gatsbyjs/gatsby/blob/master/packages/gatsby/src/redux/actions/public.js#L676 so I think this should possibly be closed. @stefanprobst what do you think?

In any case I am struggling to find a test case that covers this (failed validation) case. Am I right in thinking that a test for this code is missing here: https://github.com/gatsbyjs/gatsby/blob/master/packages/gatsby/src/redux/__tests__/nodes.js
?

I am new to the project so maybe I am missing something

@LekoArts
Copy link
Contributor

This has been fixed in the meantime.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Issue with a clear description that the community can help with. status: confirmed Issue with steps to reproduce the bug that’s been verified by at least one reviewer. type: bug An issue or pull request relating to a bug in Gatsby
Projects
None yet
Development

No branches or pull requests

5 participants