Handle the error in .catch() instead of just displaying a message in the log.
.catch(err => {
console.log(err);
// do your error handling here
});
Handle the error in .catch() instead of just displaying a message in the log.
.catch(err => {
console.log(err);
// do your error handling here
});