Looking for advice on parsing Genesys Cloud webhook events in a Node.js Lambda. The doc says the payload structure is standard, but event.body comes back as a string, not an object. I’m trying JSON.parse(event.body) but getting a syntax error on the first call.
Make sure you wrap that parse in a try-catch block, aws often sends empty strings or malformed payloads that crash the lambda instantly. here’s how i structure it with otel tracing so i can see exactly where it fails: