Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
ranjankv opened this issue Nov 1, 2023 · 1 comment
Open

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

ranjankv opened this issue Nov 1, 2023 · 1 comment

Comments

@ranjankv
Copy link

ranjankv commented Nov 1, 2023

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
Copy link
Contributor

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.

  • Error message / stack trace
  • The cloud provider are using
  • The apiPost code snippet that you mentioned that was working

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants