Promises have their own catch clause. You can catch it through that.
try { new Promise((res, rej) => rej(new Error('You cannot catch me. Haha'))) .catch(error => console.log("caught")); } catch (err) { conosle.error(err); }