-
Notifications
You must be signed in to change notification settings - Fork 10.3k
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
[gatsby-source-graphql] | Handle server errors during query in gatsby build #10487
Comments
I've tried to replicate this - I might be missing something, but the error seems to be quite verbose:
What kind of info do you want in the log? |
I was thinking it will be useful to say whether the error is thrown because the server is not responding or because the field is missing. |
Hiya! This issue has gone quiet. Spooky quiet. 👻 We get a lot of issues, so we currently close issues after 30 days of inactivity. It’s been at least 20 days since the last update here. If we missed this issue or if you want to keep it open, please reply here. You can also add the label "not stale" to keep this issue open! Thanks for being a part of the Gatsby community! 💪💜 |
Hey again! It’s been 30 days since anything happened on this issue, so our friendly neighborhood robot (that’s me!) is going to close it. Please keep in mind that I’m only a robot, so if I’ve closed this issue in error, I’m Thanks again for being part of the Gatsby community! |
@aamorozov It would be nice to see what exactly is returned from the server in this case. < is likely a begining of html or xml tag. It seems to happen to me because the multiple sites are being built in CI at once and hammering my GraphQL backend staging instance pretty hard, but exact response is hard to debug since this error only occasionally happens. |
In my opinion, the plugin should handle the HTTP status code from the GraphQL API. If it's a non 2xx status code, it should show the status code and the response instead of the |
any update on this? the errors are too obscur as is |
I used the
|
I could open a PR to edit the default |
That'd be great. We should print out good errors by default. |
There are ~ 150 queries in build time in my project and the server might respond with 500 error on one of them, but since there is no way to debug and/or suppress that error the whole build fails. It would be very helpful if gatsby's graphql could either log a more verbose output or provide the way to suppress such errors. It does output the template which the query fails on.
Looks like it's throwing from query-runner here
gatsby/packages/gatsby/src/internal-plugins/query-runner/query-runner.js
Line 58 in 2cd7bfa
Environment
The text was updated successfully, but these errors were encountered: