re: The dangers of async/await VIEW POST

re: I don't see why this would be considered a caveat? Thenable promises also need to explicitly declare a Promise#catch() to handle errors? What makes...

I mean it's something to be aware of and it's often overlooked and not mentioned at all in articles discussing and guiding on async-await.

The difference between this and promises is that catch callbacks can be put specifically in any place in a promise chain. Of course, we can also do this with try-catch around a single statement, but that gets ugly pretty fast, especially if we want to keep the same variable scope between related try-catch blocks.

code of conduct - report abuse