{"record":{"id":"1b1744ddc10e6a75","repo":"gatsbyjs/gatsby","slug":"fetchcontenttypes","errorCode":"FetchContentTypes","errorMessage":"Restricted ContentType name found. The name \"${contentTypeItemId}\" is not allowed.","messagePattern":"Restricted ContentType name found\\. The name \"(.+?)\" is not allowed\\.","errorType":"panic","errorClass":null,"httpStatus":null,"severity":"error","filePath":"packages/gatsby-source-contentful/src/create-schema-customization.js","lineNumber":54,"sourceCode":"  // Check for restricted content type names and set id based on useNameForId\n  const useNameForId = pluginConfig.get(`useNameForId`)\n  const restrictedContentTypes = [`entity`, `reference`, `asset`]\n\n  if (pluginConfig.get(`enableTags`)) {\n    restrictedContentTypes.push(`tag`)\n  }\n\n  contentTypeItems.forEach(contentTypeItem => {\n    // Establish identifier for content type\n    //  Use `name` if specified, otherwise, use internal id (usually a natural-language constant,\n    //  but sometimes a base62 uuid generated by Contentful, hence the option)\n    let contentTypeItemId = contentTypeItem.sys.id\n    if (useNameForId) {\n      contentTypeItemId = contentTypeItem.name.toLowerCase()\n    }\n\n    if (restrictedContentTypes.includes(contentTypeItemId)) {\n      reporter.panic({\n        id: CODES.FetchContentTypes,\n        context: {\n          sourceMessage: `Restricted ContentType name found. The name \"${contentTypeItemId}\" is not allowed.`,\n        },\n      })\n    }\n  })\n\n  // Store processed content types in cache for sourceNodes\n  const sourceId = `${pluginConfig.get(`spaceId`)}-${pluginConfig.get(\n    `environment`\n  )}`\n  const CACHE_CONTENT_TYPES = `contentful-content-types-${sourceId}`\n  await cache.set(CACHE_CONTENT_TYPES, contentTypeItems)\n\n  return contentTypeItems\n}\n","sourceCodeStart":36,"sourceCodeEnd":72,"githubUrl":"https://github.com/gatsbyjs/gatsby/blob/8b06340921ffdf23125a365b9c9923690cb62ce6/packages/gatsby-source-contentful/src/create-schema-customization.js#L36-L72","documentation":"Error \"Restricted ContentType name found. The name \"${contentTypeItemId}\" is not allowed.\" thrown in gatsbyjs/gatsby.","triggerScenarios":"Thrown at packages/gatsby-source-contentful/src/create-schema-customization.js:54 when the library encounters an invalid state.","commonSituations":"Occurs when a Contentful content type uses a reserved/restricted name (e.g. 'ContentType'). Rename the content type in Contentful to avoid restricted identifiers.","solutions":["Rename the Contentful content type to avoid restricted names (names that collide with Gatsby internal types such as Node or names starting with reserved prefixes).","Create a new content type in Contentful with an allowed name and migrate the entries."],"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"}