fix: throw error when Slack events API returns success: false

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 <noreply@anthropic.com>
This commit is contained in:
dal 2025-08-18 14:43:03 -06:00
parent 35193e53ce
commit 4fe488e1bd
No known key found for this signature in database
GPG Key ID: 16F4B0E1E9F61122
1 changed files with 6 additions and 0 deletions

View File

@ -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