Skip to content

Commit

Permalink
feat(gatsby-source-wordpress): improve error logging for wordpress AP…
Browse files Browse the repository at this point in the history
…I requests (#8967)

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

* log path on every error
  • Loading branch information
maxlapides authored and pieh committed Oct 10, 2018
1 parent 365942b commit 3bac0c4
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ const colorized = require(`./output-color`)
*/
function httpExceptionHandler(e) {
const { response, code } = e
console.log(colorized.out(`Path: ${response.request.path}`, colorized.color.Font.FgRed))
if (!response) {
console.log(
colorized.out(
Expand All @@ -30,7 +31,7 @@ function httpExceptionHandler(e) {
if (message) {
console.log(
colorized.out(
`Inner exception message : "${message}"`,
`Inner exception message: "${message}"`,
colorized.color.Font.FgRed
)
)
Expand Down

0 comments on commit 3bac0c4

Please sign in to comment.