How do I handle errors with promises?
Rule of Thumb Whenever you have a doubt about how to do something with promises – think about the synchronous version. try{ var result = myFn(param); // business logic with result } catch(e) { //error handling logic } This, at least to me looks a lot cleaner than a callback with a first parameter that … Read more