var response = await promisedFunction().catch((err) => { console.error(err); }); // response will be undefined if the promise is rejected // this will work instead of using try...catch...