{"record":{"id":"f7baeb057252fb99","repo":"gatsbyjs/gatsby","slug":"111002","errorCode":"111002","errorMessage":"${errorContext || ``}\\n\\n${e.message} \\n\\nReceived HTML as a response. Are you sure ${url} is the correct URL and WPGraphQL is active?","messagePattern":"(.+?)\\\\n\\\\n(.+?) \\\\n\\\\nReceived HTML as a response\\. Are you sure (.+?) is the correct URL and WPGraphQL is active\\?","errorType":"panic","errorClass":null,"httpStatus":null,"severity":"error","filePath":"packages/gatsby-source-wordpress/src/utils/fetch-graphql.ts","lineNumber":557,"sourceCode":"      pluginOptions?.debug?.graphql?.copyHtmlResponseOnError\n\n    if (copyHtmlResponseOnError) {\n      try {\n        // clipboardy is ESM-only package\n        const { default: clipboardy } = await import(`clipboardy`)\n        if (`writeSync` in clipboardy) {\n          clipboardy.writeSync(response.data)\n        }\n      } catch (e) {\n        reporter.error(\n          formatLogMessage(\n            `Unable to copy html response on error.\\n\\n${e.message ?? ``}`\n          )\n        )\n      }\n    }\n\n    reporter.panic({\n      id: CODES.BadResponse,\n      context: {\n        sourceMessage: formatLogMessage(\n          `${errorContext || ``}\\n\\n${\n            e.message\n          } \\n\\nReceived HTML as a response. Are you sure ${url} is the correct URL and WPGraphQL is active?\\n\\nIf you're sure WPGraphQL is active, visit that URL in a browser - if it redirects to the correct URL,\\nor you've entered the wrong URL in settings,\\nyou might receive this error.\\nVisit that URL in your browser and if it looks good copy/paste it from your URL bar to your gatsby-config.js.\\n\\n${ensureStatementsAreTrue}${\n            copyHtmlResponseOnError\n              ? `\\n\\nCopied HTML response to your clipboard.`\n              : `\\n\\n${bold(\n                  `Further debugging`\n                )}\\nIf you still receive this error after following the steps above, this may be a problem with your WordPress instance.\\nA plugin or theme may be adding additional output for some posts or pages.\\nAdd the following plugin option to copy the html response to your clipboard for debugging.\\nYou can paste the response into an html file to see what's being returned.\\n\n{\n  resolve: \"gatsby-source-wordpress\",\n  options: {\n    debug: {\n      graphql: {\n        copyHtmlResponseOnError: true\n      }","sourceCodeStart":539,"sourceCodeEnd":575,"githubUrl":"https://github.com/gatsbyjs/gatsby/blob/8b06340921ffdf23125a365b9c9923690cb62ce6/packages/gatsby-source-wordpress/src/utils/fetch-graphql.ts#L539-L575","documentation":"Error \"${errorContext || ``}\\n\\n${e.message} \\n\\nReceived HTML as a response. Are you sure ${url} is the correct URL and WPGraphQL is active?\" thrown in gatsbyjs/gatsby.","triggerScenarios":"Thrown at packages/gatsby-source-wordpress/src/utils/fetch-graphql.ts:557 when the library encounters an invalid state.","commonSituations":"Occurs when the WPGraphQL endpoint returns HTML instead of JSON, meaning the URL is wrong or WPGraphQL is inactive. Verify the endpoint URL and that the WPGraphQL plugin is installed and active.","solutions":["Verify the url option points to the WPGraphQL endpoint (usually https://yoursite.com/graphql), not the site root.","Confirm WPGraphQL is installed and active on the WordPress site.","Check for security plugins or server rules returning an HTML error page for the endpoint."],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"8b06340921ffdf23125a365b9c9923690cb62ce6","analyzedAt":"2026-08-13T02:36:21.405Z","schemaVersion":2},"datasetVersion":"2026-08-13T04:17:16.726Z"}