Platform API SDK Node.js — Cannot read property 'body' of undefined on POST

The Node.js SDK is an absolute nightmare to debug.

I inherited this integration, and every POST request throws Cannot read property 'body' of undefined. After 6 hours of digging, I discovered the previous developer was passing the request body as the second argument instead of wrapping it in an options object. The SDK silently swallows the payload and sends an empty request to the API, which returns a 400, and then the SDK tries to parse undefined.body. Brilliant error handling, truly world-class.

The fix: wrap your body in { body: yourPayload }. You are welcome.

I’m not a developer, but this error is showing up as a red banner on my Performance dashboard. It says ‘Integration Error: Cannot read property body of undefined’ at the bottom of the screen.

Is this something I can fix, or do I need to call my IT department? I just want to see my agents’ handle times.