File tree Expand file tree Collapse file tree 1 file changed +12
-0
lines changed
Expand file tree Collapse file tree 1 file changed +12
-0
lines changed Original file line number Diff line number Diff line change @@ -1166,6 +1166,12 @@ export async function queueWebhookExecution(
11661166 } )
11671167 }
11681168
1169+ // Slack requires an empty 200 for interactive payloads (view_submission, block_actions, etc.)
1170+ // A JSON body like {"message":"..."} is not a recognized response format and causes modal errors
1171+ if ( foundWebhook . provider === 'slack' ) {
1172+ return new NextResponse ( null , { status : 200 } )
1173+ }
1174+
11691175 // Twilio Voice requires TwiML XML response
11701176 if ( foundWebhook . provider === 'twilio_voice' ) {
11711177 const providerConfig = ( foundWebhook . providerConfig as Record < string , any > ) || { }
@@ -1211,6 +1217,12 @@ export async function queueWebhookExecution(
12111217 )
12121218 }
12131219
1220+ if ( foundWebhook . provider === 'slack' ) {
1221+ // Return empty 200 to avoid Slack showing an error dialog to the user,
1222+ // even though processing failed. The error is already logged above.
1223+ return new NextResponse ( null , { status : 200 } )
1224+ }
1225+
12141226 if ( foundWebhook . provider === 'twilio_voice' ) {
12151227 const errorTwiml = `<?xml version="1.0" encoding="UTF-8"?>
12161228<Response>
You can’t perform that action at this time.
0 commit comments