I think this is more useful to pass any error from YM API up to caller in service which uses this library.
Currently, library users are not able to handle errors in YM API calls (as a result can't figure out why, for example, some goals are not tracked).
I think my approach is more flexible since library users may wrap ym calls with their own wrappers which uses try { ym(...) } catch(e) {} and do something with these errors.
I think this is more useful to pass any error from YM API up to caller in service which uses this library. Currently, library users are not able to handle errors in YM API calls (as a result can't figure out why, for example, some goals are not tracked). I think my approach is more flexible since library users may wrap ym calls with their own wrappers which uses
try { ym(...) } catch(e) {}
and do something with these errors.