Quick question about handling persistent 5xx errors on our custom webhook endpoint.
Genesys Cloud retries failed deliveries, but I need a local dead letter queue to capture messages that fail after the final retry.
My Node.js handler currently logs the error but drops the payload. I need to store the raw JSON body and the x-gc-request-id header for later analysis.
What is the most efficient way to intercept the 5xx response and push the event to an SQS DLQ before the framework discards it?