async function myFunction() { try { await somethingThatReturnsAPromise(); } catch (err) { console.log(err) } } async function myFunction() { await somethingThatReturnsAPromise().catch(function(err){console.log(err);}) }