This may seem stupid, but I\'m trying to get the error data when a request fails in Axios.
axios.get(\'foo.com\') .then((response) => {}) .catch((
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.