sw-tools / checkin-service

Checks the user in to a flight
MIT License
9 stars 3 forks source link

Make parallel requests to fetch checkin data #17

Closed swtools0 closed 2 years ago

swtools0 commented 2 years ago

Resolves #15

aaron-pham commented 2 years ago

Hey, I recently just deployed this branch to my aws account and was doing some testing. I am getting an error ERROR TypeError: Promise.any is not a function. It appears that Promise.any is a node.js 15+ thing, while the lambda runtime is 14.x . I'm still looking into this but just a heads up.

aaron-pham commented 2 years ago

Okay, I found a workaround for the issue above - https://www.npmjs.com/package/promise.any, this library is a Promise.any() replacement I believe.

However, I tried doing a checkin with this code + arn addition + that promise.any replacement, and the checkin ended up failing. Not sure what happened but all 80 of my request for a 404 not found. The flight was definitely ready for checkin.

I'll be putting this down for the night, but let me know if you have any additional findings!

aaron-pham commented 2 years ago

I've confirmed this works (after rebasing on master of course), the logging didn't change though (before you added depth).

swtools0 commented 2 years ago

I've confirmed this works (after rebasing on master of course), the logging didn't change though (before you added depth).

@aaron-pham It successfully checked you in or you can see the full error now?

aaron-pham commented 2 years ago

Oops sorry, it successfully checked me in. The logs appeared the same (not showing the entire block) but I had util.inspect(error) on my version. Didn't pick up the change to util.inspect(error, { depth: null }) by the time my checkin was ready.