Is it standard practice to push failed Genesys Cloud webhook payloads directly to an SQS Dead Letter Queue when the consumer returns a 503? I’m writing a Node.js middleware that catches the error, but I need to know if I should just return a 200 to Genesys to stop the retry loop or if I should let it hang. Here’s the logic I’m using right now:
app.post('/webhook', async (req, res) => {
try {
await processEvent(req.body);
res.status(200).send();
} catch (err) {
await sqs.sendMessage({ QueueUrl: DLQ_URL, MessageBody: JSON.stringify(req.body) });
res.status(200).send(); // Stopping retries manually
}
});