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((
As @Nick said, the results you see when you console.log a JavaScript Error object depend on the exact implementation of console.log, which varies and (imo) makes checking errors incredibly annoying.
If you'd like to see the full Error object and all the information it carries bypassing the toString() method, you could just use JSON.stringify:
axios.get('/foo')
.catch(function (error) {
console.log(JSON.stringify(error))
});