gatsbyjs/gatsby · error
FetchTags
FetchTags
Error message
Error fetching tags: ${createContentfulErrorMessage(e)} What it means
Error "Error fetching tags: ${createContentfulErrorMessage(e)}" thrown in gatsbyjs/gatsby.
Source
Thrown at packages/gatsby-source-contentful/src/fetch.js:354
!currentSyncData?.deletedEntries.length &&
!currentSyncData?.deletedAssets.length
) {
syncProgress.tick()
syncProgress.total = 1
}
syncProgress.done()
}
// We need to fetch tags with the non-sync API as the sync API doesn't support this.
let tagItems = []
if (pluginConfig.get(`enableTags`)) {
try {
const tagsResult = await pagedGet(client, `getTags`, pageLimit)
tagItems = tagsResult.items
reporter.verbose(`Tags fetched ${tagItems.length}`)
} catch (e) {
reporter.panic({
id: CODES.FetchTags,
context: {
sourceMessage: `Error fetching tags: ${createContentfulErrorMessage(
e
)}`,
},
})
}
}
const result = {
currentSyncData,
tagItems,
defaultLocale,
locales,
space,
}
View on GitHub (pinned to 8b06340921)
Solutions
- Verify the Contentful access token has permission to read tags for the space/environment.
- Check the space ID and environment in plugin options, then retry the build.
When it happens
Trigger: Thrown at packages/gatsby-source-contentful/src/fetch.js:354 when the library encounters an invalid state.
Common situations: Occurs when fetching tags from the Contentful API fails. Check network connectivity and that the access token has permission to read tags in the target environment.
AI-assisted analysis of gatsbyjs/gatsby@8b06340921 (2026-08-13).
Data as JSON: /api/errors/52036d039730ea52.
Report an issue: GitHub.