HOC wrapping function to decorate async functions that returns a promise if you want all of them to handle error the same way.
const errorHandlingStrategy = e => {
// do something with the error
console.log(e);
};
cosnt handleError = fn => (...params) => fn(...params).catch(errorHandlingStrategy);