Skip to content

Commit

Permalink
fix(gatsby-source-wordpress): improve error message for folks who've …
Browse files Browse the repository at this point in the history
…never used WP_DEBUG (#30356)

* improve error message for folks who've never used WP_DEBUG

* add WP.org docs link

* disable eslint error - the escapes here are not useless
  • Loading branch information
TylerBarnes committed Mar 22, 2021
1 parent d534602 commit 7cd9cd3
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion packages/gatsby-source-wordpress/src/utils/fetch-graphql.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
/* eslint-disable no-useless-escape */

import { IPluginOptions } from "~/models/gatsby-api"
import { GatsbyReporter } from "./gatsby-types"
import prettier from "prettier"
Expand Down Expand Up @@ -364,7 +366,15 @@ ${getLowerRequestConcurrencyOptionMessage()}`,
Your WordPress server is either overloaded or encountered a PHP error.
${errorContext ? `\n${errorContext}\n` : ``}
Enable WP_DEBUG, WP_DEBUG_LOG, and WPGRAPHQL_DEBUG, run another build and then check your WordPress instance's debug.log file.
Enable WordPress debugging by adding the following to your wp-config.php file:
define("WP\_DEBUG", true);
define("WP\_DEBUG\_LOG", true);
define("GRAPHQL\_DEBUG", true);
(See https://wordpress.org/support/article/debugging-in-wordpress/ for more info)
Then run another build before checking your WordPress instance's debug.log file for errors.
If you don't see any errors in debug.log:
Expand Down

0 comments on commit 7cd9cd3

Please sign in to comment.