Handling errors with async/await and promises
https://medium.com/@cvitullo/handling-errors-with-async-await-and-promises-cd2fea534f08
I love promises. They’re a fantastic model for asynchronous behavior, and await makes it very easy to avoid callback hell (though I'd argue promises do a great job of that on their own). Once you can build a mental model for how promises work, you can build some very complex asynchronous flows in a handful of lines of code.
As much as I love having async/await in my toolbox, there are several quirks to handling errors when using it. It’s very easy to write error handling in a way that it swallows more errors than you want, and strategies to work around that negate some of the readability advantages that async/await brings.