You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I think mixing callbacks and promises is not the best thing to do - I would suggest returning a Promise from the handler.
The reason why your second example fails because you're passing a string ('null') instead of null. AWS lambda accepts non-null values as the first parameter of callback() to trigger the error case.
So your first handler (the one that works) would look like:
I am calling a function which returns a Promise, but it isn't working.
This works:
This doesn't
My test:
The text was updated successfully, but these errors were encountered: