Relative Content

Tag Archive for javascriptpromise

console.log write parameter from function as undefined

I use the following code to get AWS ECS status. But while try to debug I recognized that
serviceName is always “undefined”. Why?
It seems that the AWS SDK functions inside this codeblock use serviceName with the correct value.

Cannot cancel the promise chain

I am new to Javascript now and trying to learn it. The firstPromise will reject and run the catch instead of then. Now, I want it to skip all the other then‘s and goes to finally.