I have a config load function that loads some data from a json file and resolves a promise with it.
When I call the load function I'm wondering what the better way is to handle errors. From what I understand and can there are two options.
public config: any = this.configProvider.load()
.then(data => this)
.then(error => console.error(error));
versus
public config: any = this.configProvider.load()
.then(data => this)
.catch(function(err){
console.log(err);
}