From 9df1f1ac2e6d27bd9da8ff4892d4c76b7571d9de Mon Sep 17 00:00:00 2001 From: Dean Zaka Hidayat Date: Fri, 20 Nov 2026 17:38:41 +0700 Subject: [PATCH] fix(make): Send an empty JSON body on webhook detach Make sends `Content-Type: application/json` on a detach DELETE. Taskade answers 400 to a JSON request with an empty body, so the webhook stayed in Taskade after a Make hook or scenario was deleted. Send `{}`. The validator now fails a DELETE detach that has no body. Co-Authored-By: Claude Opus 5.5 --- packages/make-app-taskade/test/validate.mjs | 4 ++++ .../webhooks/comment-created/detach.iml.jsonc | 1 + .../webhooks/project-assigned/detach.iml.jsonc | 1 + .../webhooks/project-created/detach.iml.jsonc | 1 + .../make-app-taskade/webhooks/project-joined/detach.iml.jsonc | 1 + .../make-app-taskade/webhooks/task-assigned/detach.iml.jsonc | 1 + packages/make-app-taskade/webhooks/task-due/detach.iml.jsonc | 1 + 7 files changed, 10 insertions(+) diff --git a/packages/make-app-taskade/test/validate.mjs b/packages/make-app-taskade/test/validate.mjs index e153ec0..f137bdb 100644 --- a/packages/make-app-taskade/test/validate.mjs +++ b/packages/make-app-taskade/test/validate.mjs @@ -229,6 +229,10 @@ for (const id of Object.keys(components.webhook)) { } }); } + // Make sends `Content-Type: application/json` on a detach, and Taskade answers 400 to a + // JSON request with an empty body, so the webhook stays. Send `{}`. + const detach = code[`webhook.${id}.detach`]; + if (detach?.method === 'DELETE' && detach.body == null) fail(`webhook.${id}.detach: a DELETE needs "body": {}`); } // "Deploy to Make" creates a module or RPC with its local ID as the name, and refuses // an ID with a dash (Make Apps Editor 2.9.0, validate-id.js). diff --git a/packages/make-app-taskade/webhooks/comment-created/detach.iml.jsonc b/packages/make-app-taskade/webhooks/comment-created/detach.iml.jsonc index 358714e..015f849 100644 --- a/packages/make-app-taskade/webhooks/comment-created/detach.iml.jsonc +++ b/packages/make-app-taskade/webhooks/comment-created/detach.iml.jsonc @@ -1,6 +1,7 @@ { "url": "https://www.taskade.com/api/v2/webhooks/{{encodeURL(webhook.externalHookId)}}", "method": "DELETE", + "body": {}, "headers": { "Authorization": "Bearer {{connection.accessToken}}" }, diff --git a/packages/make-app-taskade/webhooks/project-assigned/detach.iml.jsonc b/packages/make-app-taskade/webhooks/project-assigned/detach.iml.jsonc index 358714e..015f849 100644 --- a/packages/make-app-taskade/webhooks/project-assigned/detach.iml.jsonc +++ b/packages/make-app-taskade/webhooks/project-assigned/detach.iml.jsonc @@ -1,6 +1,7 @@ { "url": "https://www.taskade.com/api/v2/webhooks/{{encodeURL(webhook.externalHookId)}}", "method": "DELETE", + "body": {}, "headers": { "Authorization": "Bearer {{connection.accessToken}}" }, diff --git a/packages/make-app-taskade/webhooks/project-created/detach.iml.jsonc b/packages/make-app-taskade/webhooks/project-created/detach.iml.jsonc index 358714e..015f849 100644 --- a/packages/make-app-taskade/webhooks/project-created/detach.iml.jsonc +++ b/packages/make-app-taskade/webhooks/project-created/detach.iml.jsonc @@ -1,6 +1,7 @@ { "url": "https://www.taskade.com/api/v2/webhooks/{{encodeURL(webhook.externalHookId)}}", "method": "DELETE", + "body": {}, "headers": { "Authorization": "Bearer {{connection.accessToken}}" }, diff --git a/packages/make-app-taskade/webhooks/project-joined/detach.iml.jsonc b/packages/make-app-taskade/webhooks/project-joined/detach.iml.jsonc index 358714e..015f849 100644 --- a/packages/make-app-taskade/webhooks/project-joined/detach.iml.jsonc +++ b/packages/make-app-taskade/webhooks/project-joined/detach.iml.jsonc @@ -1,6 +1,7 @@ { "url": "https://www.taskade.com/api/v2/webhooks/{{encodeURL(webhook.externalHookId)}}", "method": "DELETE", + "body": {}, "headers": { "Authorization": "Bearer {{connection.accessToken}}" }, diff --git a/packages/make-app-taskade/webhooks/task-assigned/detach.iml.jsonc b/packages/make-app-taskade/webhooks/task-assigned/detach.iml.jsonc index 358714e..015f849 100644 --- a/packages/make-app-taskade/webhooks/task-assigned/detach.iml.jsonc +++ b/packages/make-app-taskade/webhooks/task-assigned/detach.iml.jsonc @@ -1,6 +1,7 @@ { "url": "https://www.taskade.com/api/v2/webhooks/{{encodeURL(webhook.externalHookId)}}", "method": "DELETE", + "body": {}, "headers": { "Authorization": "Bearer {{connection.accessToken}}" }, diff --git a/packages/make-app-taskade/webhooks/task-due/detach.iml.jsonc b/packages/make-app-taskade/webhooks/task-due/detach.iml.jsonc index 358714e..015f849 100644 --- a/packages/make-app-taskade/webhooks/task-due/detach.iml.jsonc +++ b/packages/make-app-taskade/webhooks/task-due/detach.iml.jsonc @@ -1,6 +1,7 @@ { "url": "https://www.taskade.com/api/v2/webhooks/{{encodeURL(webhook.externalHookId)}}", "method": "DELETE", + "body": {}, "headers": { "Authorization": "Bearer {{connection.accessToken}}" },