Merge pull request #715 from buster-so/staging

fix: throw error when Slack events API returns success: false
This commit is contained in:
dal 2025-08-18 15:30:00 -06:00 committed by GitHub
commit f135f930cf
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
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