gatsbyjs/gatsby · error

Received body was empty!

Error message

Received body was empty!

What it means

gatsby-source-drupal's webhook endpoint (onWebhook) responds 400 when the DELETE/update webhook request has an empty body, so there is no node payload to process. It guards the webhook receiver before JSON parsing.

Source

Thrown at packages/gatsby-source-drupal/src/gatsby-node.ts:884

          actions.deleteNode(getNode(createNodeId(id)))
          return reporter.log(`Deleted node: ${id}`)
        }
        const nodeToUpdate = JSON.parse(JSON.parse(req.body)).data
        return await handleWebhookUpdate(
          {
            nodeToUpdate,
            actions,
            cache,
            createNodeId,
            createContentDigest,
            getCache,
            getNode,
            reporter,
          },
          pluginOptions
        )
      } else {
        res.status(400).send(`Received body was empty!`)
        return reporter.log(`Received body was empty!`)
      }
    }
  )
}

exports.pluginOptionsSchema = ({ Joi }) =>
  Joi.object({
    baseUrl: Joi.string()
      .required()
      .description(`The URL to root of your Drupal instance`),
    proxyUrl: Joi.string().description(
      `The CDN URL equivalent to your baseUrl`
    ),
    apiBase: Joi.string().description(
      `The path to the root of the JSONAPI — defaults to "jsonapi"`
    ),
    basicAuth: Joi.object({

View on GitHub (pinned to e85d62f177)

Solutions

  1. Ensure the Drupal webhook sends a JSON body
  2. Re-send the webhook with the node payload
  3. Check webhook secret/URL configuration if bodies are being stripped
Defensive patterns

Strategy: validation

When it happens

Trigger: Thrown at packages/gatsby-source-drupal/src/gatsby-node.ts:884 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/fbaf7ff51deb74b3. Report an issue: GitHub.