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

fix(gatsby): Add error message for field extension validation #16232

Merged
merged 1 commit into from
Jul 30, 2019

Conversation

stefanprobst
Copy link
Contributor

Improve error message in field extension arg validation.

@stefanprobst stefanprobst requested a review from a team as a code owner July 30, 2019 20:56
Copy link
Contributor

@sidharthachatterjee sidharthachatterjee left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a helpful error! Thank you @stefanprobst 👍

@sidharthachatterjee sidharthachatterjee changed the title fix(gatsby): Improve error message in field extension arg validation Jul 30, 2019
@sidharthachatterjee sidharthachatterjee merged commit f64a9e0 into gatsbyjs:master Jul 30, 2019

if (!args || typeof args !== `object`) {
report.error(
`Field extension arguments must be provided as an object. ` +
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you switch this to use the new structured errors?

There's been a number of PRs recently switching code over that you can draw from. New errors should all use it as it provides better tracking plus makes it a lot easier to refine the help we give people.

Thanks!

@stefanprobst stefanprobst deleted the improve-errormsg branch July 31, 2019 04:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
3 participants