You can put the error into an object and log the object, like this:
axios.get('foo.com')
.then((response) => {})
.catch((error) => {
console.log({error}) // this will log an empty object with an error property
});
Hope this help someone out there.