re: Simplify JavaScript Promises VIEW POST

re: Nice article, there needs to be more about promises because their error handling is a bit finnicky. Always add a .catch(), because promises will s...

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.


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.

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

code of conduct - report abuse