I'm using Bolt for developing my slack bot, but I'm having trouble submitting the pop-up modal. My understanding is that this modal will send a POST payload to /slack/form URL (see photo below), so I've used Bolt's customRoutes handler to response with a 200 code and empty body (per Slack's documentation). However, I continue to receive the following error in my hosting platform's logs (Render) when clicking 'Submit':
[ERROR] An unexpected error occurred during a request (POST) made to /slack/form
I've experimented with variations of the response per this post, but none have seemed to work so far with my level of understanding. Has anyone had experience working with Bolt and Modal submissions to offer some guidance?
Slack URL configuration for modals
Submit error
Code
// This is my URL handler
{
path: "https://slack-glossary-bot.onrender.com/slack/form",
method: ["POST"],
handler: (req, res) => {
res.writeHead(200);
res.write();
res.end();
},
},


Correction, I've solved it - per Bolt's documentation (see image below), all request URLS (including interactivity payloads) must end in /slack/events.
Thus, I've changed my code to the following: