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

[gatsby-source-wordpress] log failed HTTP requests #8928

Closed
maxlapides opened this issue Oct 8, 2018 · 2 comments · Fixed by #8967
Closed

[gatsby-source-wordpress] log failed HTTP requests #8928

maxlapides opened this issue Oct 8, 2018 · 2 comments · Fixed by #8967

Comments

@maxlapides
Copy link
Contributor

Summary

When setting up a new Gatsby Wordpress site, I was experiencing a lot of errors that looked like this:

⠄ source and transform nodesThe server response was "401 Unauthorized"
Inner exception message : "You are not currently logged in."

As a new Gatsby user, I had no idea what this meant. It appeared to be a major blocking issue, but turned out to not be a big deal.

My suggestion is to log the paths to the routes that are failing so it's easy for the developer to update excludedRoutes. I ended up hacking the plugin to print the routes so I could figure out what was going on.

Motivation

These errors are very intimidating to new users, and difficult to debug. We can improve the developer experience significantly with a little bit of work on the error logs.

@kakadiadarpan
Copy link
Contributor

kakadiadarpan commented Oct 9, 2018

@maxlapides improving developer experience is always a good idea. 🙂
Would you like to work on this and raise a PR?

@maxlapides
Copy link
Contributor Author

@kakadiadarpan I unfortunately don't have time to put a lot of thought into this right now, but I just submitted a small PR which I think is a good first step that will make a big difference. Let me know what you think. Thanks!

pieh pushed a commit that referenced this issue Oct 10, 2018
…I requests (#8967)

* feat(gatsby-source-wordpress): improve error logging for wordpress API requests (#8928)

* log path on every error
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

Successfully merging a pull request may close this issue.

2 participants