Replies: 1 comment
-
Hello @Matozinho, it does not look like a bug in Framework but rather in your code - I'm going to move it to discussions. As for the actual problem - if you bind something to a variable defined in global scope, it might be reused between invocations and I believe that's causing the issue in your case. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
The application is running in NodeJs and we are using Promise.race() to timeout the main promise, as show in the code (here the “mainPromise” is a generic promise for testing).
When we deploy and call the function it works the first time, but in other calls, the Promise.race return the response of the first promise in the array.
Output with Promise.race([mainPromise, promiseTimeout])
Output with Promise.race([promiseTimeout, mainPromise])
It seems the function has the response cached, because it didn’t wait 20 seconds after the first call:
serverless.yml
Beta Was this translation helpful? Give feedback.
All reactions