{"record":{"id":"d89cd1d56106e007","repo":"gatsbyjs/gatsby","slug":"the-webhook-body-was-malformed-json-stringify-w","errorCode":null,"errorMessage":"The webhook body was malformed\n\n${JSON.stringify(webhookBody, null, 4)}","messagePattern":"The webhook body was malformed\n\n(.+?)","errorType":"console","errorClass":null,"httpStatus":null,"severity":"error","filePath":"packages/gatsby-source-drupal/src/gatsby-node.ts","lineNumber":225,"sourceCode":"      `loading Drupal content changes`,\n      {\n        parentSpan,\n      }\n    )\n    changesActivity.start()\n\n    try {\n      const { secret, action, data } = webhookBody\n      if (pluginOptions.secret && pluginOptions.secret !== secret) {\n        reporter.warn(\n          `The secret in this request did not match your plugin options secret.`\n        )\n        changesActivity.end()\n        return\n      }\n\n      if (!action || !data) {\n        reporter.warn(\n          `The webhook body was malformed\n\n${JSON.stringify(webhookBody, null, 4)}`\n        )\n\n        changesActivity.end()\n        return\n      }\n\n      if (action === `delete`) {\n        let nodesToDelete = data\n        if (!Array.isArray(data)) {\n          nodesToDelete = [data]\n        }\n\n        for (const nodeToDelete of nodesToDelete) {\n          const deletedNode = await handleDeletedNode({\n            actions,","sourceCodeStart":207,"sourceCodeEnd":243,"githubUrl":"https://github.com/gatsbyjs/gatsby/blob/e85d62f1779e353eaac1753211629a26d123e26c/packages/gatsby-source-drupal/src/gatsby-node.ts#L207-L243","documentation":"Fires when a webhook body passes the secret check but is missing the required action or data fields, so the plugin cannot determine what content changed. The warning echoes the full webhook body to aid debugging. Typical causes: the sender posts the wrong payload shape, or middleware/proxies strip or rename fields.","triggerScenarios":"Thrown at packages/gatsby-source-drupal/src/gatsby-node.ts:225 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Inspect the logged webhook body and fix the sending side so it includes both action and data fields.","Verify the webhook module version in Drupal matches what gatsby-source-drupal expects.","Ensure the body is sent as application/json and not wrapped or stringified multiple times by intermediaries."],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"e85d62f1779e353eaac1753211629a26d123e26c","analyzedAt":"2026-08-26T17:50:09.662Z","contentChangedAt":"2026-08-26T17:50:09.662Z","schemaVersion":2},"datasetVersion":"2026-09-14T00:17:10.932Z"}