I'm trying to find out an answer to my question - does
myFunction()
.then(function (response) { })
.catch(function(error) { });
is the same as
myFunction()
.then(function (response) { },
function(error) {});
to handle errors from the promise? If so which one should be used as best practice?