Hi All,
I’m trying to do a simple post
request in a Hook to an API endpoint (SendGrid) and I’m getting the following error when running it in the hook.
{
"message": "Body.context received by extensibility point is not an object",
"statusCode": 500,
"stack": "Error: Body.context received by extensibility point is not an object\n at Authz.is_authorized.error (/data/sandbox/node_modules/auth0-ext-compilers/lib/compilers/user-registration.js:21:23)\n at Object.is_authorized (/data/sandbox/node_modules/auth0-ext-compilers/lib/authorization.js:13:81)\n at userRegistrationHandler (/data/sandbox/node_modules/auth0-ext-compilers/lib/compilers/user-registration.js:9:18)\n at parseBody (/data/sandbox/node_modules/auth0-ext-compilers/lib/adapter.js:90:20)\n at finish (/data/sandbox/node_modules/auth0-ext-compilers/node_modules/wreck/lib/index.js:369:16)\n at wrapped (/data/sandbox/node_modules/auth0-ext-compilers/node_modules/hoek/lib/index.js:879:20)\n at module.exports.internals.Recorder.onReaderFinish (/data/sandbox/node_modules/auth0-ext-compilers/node_modules/wreck/lib/index.js:415:16)\n at Object.onceWrapper (events.js:313:30)\n at emitNone (events.js:111:20)\n at module.exports.internals.Recorder.emit (events.js:208:7)"
}
So I’ve installed the Real-time webtask log extension to debug the hook but all I see in the extension or the hook logs is the following:
I’ve been trying to debug a simple post request now for hours and beginning to pull my hair out especially as I know the post code works in a node application which I’ve tested in.
Thanks,
Tom