mirror of https://github.com/buster-so/buster.git
Merge pull request #715 from buster-so/staging
fix: throw error when Slack events API returns success: false
This commit is contained in:
commit
f135f930cf
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue