gatsbyjs/gatsby · error
The ___updatePreview callback is now deprecated and will be
Error message
The ___updatePreview callback is now deprecated and will be removed in the future. Please use the __refresh callback instead.
What it means
Fires in the Gatsby preview server when a request hits the /___updatePreview/ endpoint, which the plugin now registers only for backwards compatibility. The request is still processed, but callers should move to the /__refresh/ endpoint because ___updatePreview will be removed in a future release.
Source
Thrown at packages/gatsby-source-drupal/src/gatsby-node.ts:854
{
app,
createNodeId,
getNode,
actions,
cache,
createContentDigest,
getCache,
reporter,
},
pluginOptions
) => {
app.use(
`/___updatePreview/`,
bodyParser.text({
type: `application/json`,
}),
async (req, res) => {
console.warn(
`The ___updatePreview callback is now deprecated and will be removed in the future. Please use the __refresh callback instead.`
)
if (!_.isEmpty(req.body)) {
const requestBody = JSON.parse(JSON.parse(req.body))
const { secret, action, id } = requestBody
if (pluginOptions.secret && pluginOptions.secret !== secret) {
return reporter.warn(
`The secret in this request did not match your plugin options secret.`
)
}
if (action === `delete`) {
actions.deleteNode(getNode(createNodeId(id)))
return reporter.log(`Deleted node: ${id}`)
}
const nodeToUpdate = JSON.parse(JSON.parse(req.body)).data
return await handleWebhookUpdate(
{
nodeToUpdate,View on GitHub (pinned to e85d62f177)
Solutions
- Update the sending side (Drupal preview integration) to POST to /__refresh/ instead of /___updatePreview/.
- Upgrade the Drupal Gatsby module to a version that uses the __refresh endpoint.
- No immediate action is strictly required — requests still work until the endpoint is removed.
Defensive patterns
Strategy: fallback
When it happens
Trigger: Thrown at packages/gatsby-source-drupal/src/gatsby-node.ts:854 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of gatsbyjs/gatsby@e85d62f177 (2026-08-26).
Data as JSON: /api/errors/8241e5da92a872a2.
Report an issue: GitHub.