What is the difference between synchronous exceptions and Promise rejections?
A synchronous exception is thrown while ordinary JavaScript code is executing and can be caught by a surrounding synchronous try/catch. A Promise rejection represents failure of an asynchronous Promise operation and must be handled through await inside try/catch or with a rejection handler such as catch.