what is the best practice for error handling?
1st way:-
async mainFunction() { try { await subFunction(); }catch (err){ console.log(err); } } as