Open ranjankv opened 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.
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; } };
[Get Sailthru user]: Success
[Get Sailthru user]: Error
sailthru.apiGet('user', data, callback);
}
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.
apiPost
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);
}