{"record":{"id":"22bfdf5d6cfa457d","repo":"gatsbyjs/gatsby","slug":"selfsignedcertificate","errorCode":"SelfSignedCertificate","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/8b06340921ffdf23125a365b9c9923690cb62ce6/packages/gatsby-source-contentful/src/fetch.js#L153-L189","documentation":"Error \"We couldn't make a secure connection to your contentful space. Please check if you have any self-signed SSL certificates installed.\" thrown in gatsbyjs/gatsby.","triggerScenarios":"Thrown at packages/gatsby-source-contentful/src/fetch.js:171 when the library encounters an invalid state.","commonSituations":"Occurs when the connection to the Contentful API fails TLS verification, usually because a self-signed or corporate proxy certificate is installed. Install the certificate in the system/Node trust store or configure NODE_EXTRA_CA_CERTS.","solutions":["Remove self-signed SSL certificates or add them to your system's trusted certificate store.","Set the NODE_EXTRA_CA_CERTS environment variable to point at the CA bundle that includes your certificate."],"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"}