Hey folks,
Running into a nasty issue with our outbound webhook integration. We have a custom endpoint listening for routing.queue.member.offline events, but our service has been flaky lately, throwing 500 Internal Server Errors. Genesys retries a few times, then gives up and drops the event. We’re losing critical state updates.
I want to catch these failures and push them to a dead letter queue (SQS) for manual retry or logging. My current Node.js handler looks like this:
app.post('/webhook/genesys', async (req, res) => {
try {
await processEvent(req.body);
res.status(200).send('OK');
} catch (err) {
console.error('Processing failed', err);
// Need to send to DLQ here
res.status(500).send('Failed');
}
});
The problem is, if I return 500, Genesys retries the same request. I can’t control the retry logic from the consumer side easily. Is there a way to configure the webhook in Genesys to send failed deliveries to a secondary URL? Or should I just always return 200 and handle the failure asynchronously? Feels like a hack to return 200 on error, but the alternative is losing data.