📝 The gotchas of unhandled promise rejections, and how to work around them.
📝 The gotchas of unhandled promise rejections, and how to work around them.
From the questions I've gotten about this, it seems there's a common misunderstanding around how .catch works:
Adding a catch handler to a promise doesn't un-reject the promise, it returns a new promise.