sailthru / sailthru-node-client

Sailthru Node.js client
http://docs.sailthru.com
MIT License
17 stars 15 forks source link

apiGet for 'user' is not working in serverless #47

Open ranjankv opened 12 months ago

ranjankv commented 12 months ago

If i call this function in node test app, it is working fine, but if i call it in serverless function then this is not working. callback function is not getting called.

Note: apiPost is working fine in serverless function.

code snippet

async function getUser(data) { var callback = function(err, res) { if (!err) { console.log([Get Sailthru user]: Success, {data, res}); return res; } else { console.log([Get Sailthru user]: Error, {data, err}); throw err; } };

sailthru.apiGet('user', data, callback);

}

cgreene-st commented 11 months ago

Hi @ranjankv

Happy to help you look into this issue but it would be great if you could provide us with a bit more information.