gatsbyjs/gatsby · error

The secret in this request did not match your plugin options

Error message

The secret in this request did not match your plugin options secret.

What it means

Fires in sourceNodes' webhook handling when a JSON webhook body is present but its secret field does not equal pluginOptions.secret. It is a guard against unauthorized or misconfigured webhook requests: the payload is untrusted, so the plugin ends the activity timer and skips sourcing the update entirely. Usually caused by the webhook's configured secret differing from the plugin options, or by sending the webhook to the wrong site.

Source

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

    touchNode,
    unstable_createNodeManifest,
  } = actions
  // Update the concurrency limit from the plugin options
  requestQueue.concurrency = concurrentAPIRequests

  if (webhookBody && Object.keys(webhookBody).length) {
    const changesActivity = reporter.activityTimer(
      `loading Drupal content changes`,
      {
        parentSpan,
      }
    )
    changesActivity.start()

    try {
      const { secret, action, data } = webhookBody
      if (pluginOptions.secret && pluginOptions.secret !== secret) {
        reporter.warn(
          `The secret in this request did not match your plugin options secret.`
        )
        changesActivity.end()
        return
      }

      if (!action || !data) {
        reporter.warn(
          `The webhook body was malformed

${JSON.stringify(webhookBody, null, 4)}`
        )

        changesActivity.end()
        return
      }

      if (action === `delete`) {

View on GitHub (pinned to e85d62f177)

Solutions

  1. Set the same secret value in the Drupal webhook configuration and in the gatsby-source-drupal plugin options in gatsby-config.js.
  2. Check that the webhook is being sent to the intended Gatsby site/endpoint.
  3. If secrets intentionally differ per environment, update pluginOptions.secret for the environment receiving the webhook.
Defensive patterns

Strategy: validation

When it happens

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