What happens if you don't handle a Promise rejection?

Responsive Ad Header

Question

Grade: Education Subject: Support
What happens if you don't handle a Promise rejection?
Asked by:
53 Viewed 53 Answers

Answer (53)

Best Answer
(335)
If you don't handle a Promise rejection (i.e., don't include a `.catch()` block), the promise will reject silently. In modern JavaScript, this can lead to unhandled promise rejections, which can cause your application to crash or behave unexpectedly. It's always best practice to include a `.catch()` block to handle potential errors.