gatsby: [gatsby-source-wordpress] - wp_media error
After success with the example, I’m trying various sites of mine and I’m noticing a common error:
⠠ source and transform nodes -> wordpress__PAGE fetched : 10
error Plugin gatsby-source-wordpress returned an error
TypeError: Cannot read property 'status' of undefined
- http-exception-handler.js:12 httpExceptionHandler
[tutorial-part-three]/[gatsby-source-wordpress]/http-exception-handler.js:12:27
- fetch.js:447 _callee4$
[tutorial-part-three]/[gatsby-source-wordpress]/fetch.js:447:47
- next_tick.js:109 process._tickCallback
internal/process/next_tick.js:109:7
Wondering if a common plugin or something could be causing this, or if I’m just overlooking something completely?
About this issue
- Original URL
- State: closed
- Created 7 years ago
- Comments: 18 (13 by maintainers)
@KyleAMathews I see the problem not in status but e.response not being defined. This is of course the case when the request fails because of network errors, invalid (or missing intermediate as was the case with UNABLE_TO_VERIFY_LEAF_SIGNATURE) SSL certificates, DNS etc. Shouldn’t the exception handler at least log the error code so one can easier figure these things out?
e.g.:
if thats the way to go i’ll see that i put up a pull request for this.
Closing this issue as it’s fairly old and we have far too many open issues! If you have additional problems in this area, please open a new issue!
@flmuel there’s a great free course on making your first contribution! https://egghead.io/courses/how-to-contribute-to-an-open-source-project-on-github
Would love to help you get your first PR in!
@brandensilva you’re having trouble running https://using-wordpress.gatsbyjs.org/ locally as well?
Just a general note on the WordPress source plugin — we need more maintainers of this!
Try following the contributor guide to start running the wordpress source plugin from source. Then trace your error in the source and come up with a potential solution and do a trial PR to see what people think. Would be happy to give feedback.
E.g. looking at this stack trace, the error comes from https://github.com/gatsbyjs/gatsby/blob/master/packages/gatsby-source-wordpress/src/http-exception-handler.js which means some of the errors being sent there don’t have a status.
Anyone want to try investigating the problem and finding either why some errors don’t have the status set and either fix that or handle the lack of status in the exception printer.