-
Notifications
You must be signed in to change notification settings - Fork 4.5k
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
Fix response ordering in https://github.com/serverless/examples/pull/81 #125
Conversation
Fixed in #124 |
Thanks, the next thing that bothers me, is if the fetch fails, the callback returns I'm sure sure if the Promise error or the Lambda callback is to blame. |
@kaihendry How about #126? |
Looks good. How do I quickly pull in christophgysin:improve-error-message on my cli to test I wonder?? Btw this is sage advice from a better JS programmer than I @timoxley regarding the callback return: in the first example (current state) with the .then(v => callback(null, v)).catch(callback), control goes:
while in the second example (proposal) with .then(v => callback(null, v), callback), control goes:
in the second case, control flows correctly and the callback is run only once. |
|
@kaihendry As for the advice, I'm not entirely following what you are referring to. Could you comment directly on the relevant lines in the code/PR you are referring to? |
Sorry for the earlier error on #81