From 4e4020e146eb720b730a09d61509e253c10b3cda Mon Sep 17 00:00:00 2001 From: CyberL1 Date: Tue, 2 Dec 2025 11:53:34 +0100 Subject: [PATCH] fix: send 204 even if event is invalid (discord does this, idk why) --- src/api/routes/webhooks/#webhook_id/#token/github.ts | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/api/routes/webhooks/#webhook_id/#token/github.ts b/src/api/routes/webhooks/#webhook_id/#token/github.ts index a85f4b6b8..5baf4e7ba 100644 --- a/src/api/routes/webhooks/#webhook_id/#token/github.ts +++ b/src/api/routes/webhooks/#webhook_id/#token/github.ts @@ -355,10 +355,8 @@ const parseGitHubWebhook = (req: Request, res: Response, next: NextFunction) => }, ]; break; - case "ping": - return res.status(204); default: - return res.send(500); + return res.status(204).end(); // Yes, discord sends 204 even on invalid event } req.body = discordPayload;