{"record":{"id":"b787d8d134b30fc9","repo":"gatsbyjs/gatsby","slug":"syncerror","errorCode":"SyncError","errorMessage":"Fetching contentful data failed: ${createContentfulErrorMessage(e)}","messagePattern":"Fetching contentful data failed: (.+?)","errorType":"panic","errorClass":null,"httpStatus":null,"severity":"error","filePath":"packages/gatsby-source-contentful/src/fetch.js","lineNumber":323,"sourceCode":"          currentPageLimit = Math.floor((currentPageLimit / 3) * 2) || 1\n          reporter.warn(\n            [\n              `The sync with Contentful failed using pageLimit ${lastCurrentPageLimit} as the reponse size limit of the API is exceeded.`,\n              `Retrying sync with pageLimit of ${currentPageLimit}`,\n            ].join(`\\n\\n`)\n          )\n          continue\n        }\n        throw e\n      }\n      if (currentPageLimit !== pageLimit) {\n        reporter.warn(\n          `We recommend you to set your pageLimit in gatsby-config.js to ${currentPageLimit} to avoid failed synchronizations.`\n        )\n      }\n    }\n  } catch (e) {\n    reporter.panic({\n      id: CODES.SyncError,\n      context: {\n        sourceMessage: `Fetching contentful data failed: ${createContentfulErrorMessage(\n          e\n        )}`,\n      },\n    })\n  } finally {\n    // Fix output when there was no new data in Contentful\n    if (\n      !currentSyncData?.entries.length &&\n      !currentSyncData?.assets.length &&\n      !currentSyncData?.deletedEntries.length &&\n      !currentSyncData?.deletedAssets.length\n    ) {\n      syncProgress.tick()\n      syncProgress.total = 1\n    }","sourceCodeStart":305,"sourceCodeEnd":341,"githubUrl":"https://github.com/gatsbyjs/gatsby/blob/8b06340921ffdf23125a365b9c9923690cb62ce6/packages/gatsby-source-contentful/src/fetch.js#L305-L341","documentation":"Error \"Fetching contentful data failed: ${createContentfulErrorMessage(e)}\" thrown in gatsbyjs/gatsby.","triggerScenarios":"Thrown at packages/gatsby-source-contentful/src/fetch.js:323 when the library encounters an invalid state.","commonSituations":"Occurs when fetching entries/assets from Contentful fails mid-sync, often due to rate limits, network interruptions, or revoked tokens. Retry the build, verify the access token, and consider lowering request concurrency.","solutions":["Check network connectivity to the Contentful API (cdn.contentful.com).","Verify the space ID and access token are correct and the token is not expired or revoked.","Retry the build; intermittent Contentful API errors often resolve on retry."],"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"}