DEV Community

Discussion on: Simplify JavaScript Promises

Collapse
 
sunnysingh profile image
Sunny Singh

Are you sure that you always need to add a .catch()? As long as an error is thrown, and you don't swallow the error yourself inside of your own .catch(), then it should keep bubbling up until it reaches an error handler. I could be wrong but this is the behavior I'm used to seeing with async/await.

Collapse
 
kayis profile image
K

I think you're right.

But if you deep down it can always be the case that there is a catch somewhere above that eats errors.

Thread Thread
 
sunnysingh profile image
Sunny Singh

Agree, it's generally a good idea to be explicit and prevent any edge cases.