{"record":{"id":"4f8e57aeca5db3e0","repo":"gatsbyjs/gatsby","slug":"111002-4f8e57","errorCode":"111002","errorMessage":"We couldn't make a secure connection to your contentful space. Please check if you have any self-signed SSL certificates installed.","messagePattern":"We couldn't make a secure connection to your contentful space\\. Please check if you have any self-signed SSL certificates installed\\.","errorType":"panic","errorClass":null,"httpStatus":null,"severity":"error","filePath":"packages/gatsby-source-contentful/src/fetch.js","lineNumber":171,"sourceCode":"    // Allow passing of custom configuration to the Contentful SDK like headers\n    ...(pluginConfig.get(`contentfulClientConfig`) || {}),\n  }\n\n  return contentfulClientOptions\n}\n\nfunction handleContentfulError({\n  e,\n  reporter,\n  contentfulClientOptions,\n  pluginConfig,\n}) {\n  let details\n  let errors\n  if (e.code === `ENOTFOUND`) {\n    details = `You seem to be offline`\n  } else if (e.code === `SELF_SIGNED_CERT_IN_CHAIN`) {\n    reporter.panic({\n      id: CODES.SelfSignedCertificate,\n      context: {\n        sourceMessage: `We couldn't make a secure connection to your contentful space. Please check if you have any self-signed SSL certificates installed.`,\n      },\n    })\n  } else if (e.responseData) {\n    if (\n      e.responseData.status === 404 &&\n      contentfulClientOptions.environment &&\n      contentfulClientOptions.environment !== `master`\n    ) {\n      // environments need to have access to master\n      details = `Unable to access your space. Check if ${chalk.yellow(\n        `environment`\n      )} is correct and your ${chalk.yellow(\n        `accessToken`\n      )} has access to the ${chalk.yellow(\n        contentfulClientOptions.environment","sourceCodeStart":153,"sourceCodeEnd":189,"githubUrl":"https://github.com/gatsbyjs/gatsby/blob/e85d62f1779e353eaac1753211629a26d123e26c/packages/gatsby-source-contentful/src/fetch.js#L153-L189","documentation":"Branch of the central error dispatcher handleContentfulError: a Contentful SDK request failed with Node error code SELF_SIGNED_CERT_IN_CHAIN, meaning the TLS certificate chain for cdn.contentful.com could not be verified because a self-signed certificate (typically a corporate proxy/MITM firewall that re-signs traffic) interrupts the chain. The dispatcher translates raw network error codes into user-facing panics; this branch indicates the local trust store lacks the proxy's root CA.","triggerScenarios":"Thrown at packages/gatsby-source-contentful/src/fetch.js:171 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Export the proxy/firewall's root CA certificate and add it to Node's trusted certificates, e.g. set NODE_EXTRA_CA_CERTS=/path/to/corporate-root-ca.pem in the build environment","Configure axios/the Contentful SDK to use a custom https.Agent whose ca option includes the proxy's certificate","If behind a corporate proxy, configure it to pass through *.contentful.com without TLS interception, or route the build outside the proxy","Temporarily verify the diagnosis by running the build on a network without TLS interception"],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"e85d62f1779e353eaac1753211629a26d123e26c","analyzedAt":"2026-08-26T17:50:09.662Z","contentChangedAt":"2026-08-26T17:50:09.662Z","schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}