{"record":{"id":"83c14300eed5100d","repo":"gatsbyjs/gatsby","slug":"111008","errorCode":"111008","errorMessage":"${e.message}\\n\\nSee the docs for more information:\\nhttps://github.com/gatsbyjs/gatsby/blob/master/packages/gatsby-source-wordpress/docs/tutorials/using-self-signed-certificates.md","messagePattern":"(.+?)\\\\n\\\\nSee the docs for more information:\\\\nhttps://github\\.com/gatsbyjs/gatsby/blob/master/packages/gatsby-source-wordpress/docs/tutorials/using-self-signed-certificates\\.md","errorType":"panic","errorClass":null,"httpStatus":null,"severity":"critical","filePath":"packages/gatsby-source-wordpress/src/utils/fetch-graphql.ts","lineNumber":630,"sourceCode":"    reporter.log(``)\n    if (process.env.NODE_ENV === `development`) {\n      reporter.warn(formatLogMessage(sharedEmptyStringReponseError))\n    } else {\n      reporter.panic({\n        id: CODES.BadResponse,\n        context: {\n          sourceMessage: formatLogMessage(sharedEmptyStringReponseError),\n        },\n      })\n\n      return\n    }\n\n    return\n  }\n\n  if (e.message.includes(`self signed certificate`)) {\n    reporter.panic({\n      id: CODES.SelfSignedCert,\n      context: {\n        sourceMessage: formatLogMessage(\n          `${e.message}\\n\\nSee the docs for more information:\\nhttps://github.com/gatsbyjs/gatsby/blob/master/packages/gatsby-source-wordpress/docs/tutorials/using-self-signed-certificates.md`\n        ),\n      },\n    })\n\n    return\n  }\n\n  // generic error if none of the above exit the process\n  reporter.panic({\n    id: CODES.BadResponse,\n    context: {\n      sourceMessage: formatLogMessage(\n        `${e.stack} ${\n          errorContext ? `\\n\\n` + errorContext : ``","sourceCodeStart":612,"sourceCodeEnd":648,"githubUrl":"https://github.com/gatsbyjs/gatsby/blob/8b06340921ffdf23125a365b9c9923690cb62ce6/packages/gatsby-source-wordpress/src/utils/fetch-graphql.ts#L612-L648","documentation":"Thrown by gatsby-source-wordpress when a GraphQL fetch to the WordPress instance fails because the server presents a self-signed TLS certificate that Node rejects. The plugin matches the literal substring 'self signed certificate' in the underlying request error's message and panics (halt the build) pointing to the self-signed-cert tutorial. It exists because source plugins cannot safely disable certificate verification without an explicit opt-in.","triggerScenarios":"The HTTPS WPGraphQL endpoint uses a cert that is not signed by a trusted CA (self-signed, or a private CA not in the Node trust store). The fetch-graphql error handler runs, e.message contains 'self signed certificate', and reporter.panic is invoked with code 111008.","commonSituations":"Local Docker/LocalWP WordPress instances with self-signed certs; staging servers using a corporate/private CA; HTTPS endpoints created by devcert that are not trusted by the Node process; the WP instance was switched from http to https during development.","solutions":["Set the environment variable NODE_TLS_REJECT_UNAUTHORIZED=0 only for the local build, or use the plugin's documented option to allow self-signed certs.","Install the self-signed cert / private CA into the OS trust store (or set NODE_EXTRA_CA_CERTS to the CA bundle path) so Node accepts it.","Serve WordPress over plain HTTP during local development, or put it behind a reverse proxy with a valid cert (e.g. Caddy/Let's Encrypt).","Regenerate the cert for the exact hostname you fetch from; mismatched hostnames produce a different error and will not trip this branch."],"exampleFix":"// before: NODE_TLS_REJECT_UNAUTHORIZED unset, build panics\n// after (local dev only):\nNODE_TLS_REJECT_UNAUTHORIZED=0 gatsby build\n// or in gatsby-config.js, per the plugin docs:\nresolve: `gatsby-source-wordpress`,\noptions: { /* schema/develop allow self-signed per plugin docs */ }","handlingStrategy":"validation","validationCode":"// Before configuring the plugin, verify the WP endpoint accepts HTTPS\n// without a self-signed error:\nconst https = require('https')\nhttps.get(process.env.WP_GRAPHQL_URL, res => {\n  console.log('status', res.statusCode)\n}).on('error', e => {\n  if (/self signed certificate/i.test(e.message)) {\n    console.error('Set NODE_TLS_REJECT_UNAUTHORIZED=0 or install the CA')\n  }\n})","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Use a trusted cert (Let's Encrypt via reverse proxy) for any WP instance sourced in CI.","Keep self-signed certs local-only and document NODE_TLS_REJECT_UNAUTHORIZED as a dev-only switch.","Pin the WordPress CA bundle via NODE_EXTRA_CA_CERTS for corporate/private CAs."],"tags":["ssl","tls","certificate","network","gatsby-source-wordpress"],"backgroundTag":null,"analyzedSha":"8b06340921ffdf23125a365b9c9923690cb62ce6","analyzedAt":"2026-08-13T02:36:21.405Z","schemaVersion":2},"datasetVersion":"2026-08-13T04:17:16.726Z"}