From 4fe488e1bdb035a868d2f7f921afd2650746d682 Mon Sep 17 00:00:00 2001 From: dal Date: Mon, 18 Aug 2025 14:43:03 -0600 Subject: [PATCH] fix: throw error when Slack events API returns success: false MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Ensure the Slack events endpoint never returns an HTTP 200 with success: false in the response body. Any failed event processing will now properly throw an error and return an appropriate error status code. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude --- apps/server/src/api/v2/slack/events.ts | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/apps/server/src/api/v2/slack/events.ts b/apps/server/src/api/v2/slack/events.ts index ffc58527a..be3948656 100644 --- a/apps/server/src/api/v2/slack/events.ts +++ b/apps/server/src/api/v2/slack/events.ts @@ -147,6 +147,12 @@ export async function handleSlackEventsEndpoint(c: Context) { try { // Process the event const response = await eventsHandler(payload); + + // Ensure we never return success: false without throwing + if (!response.success) { + throw new Error('Event processing failed'); + } + return c.json(response); } catch (error) { // Handle authentication errors