axios return error.response.data instead of error code example
Example: vue axios catch error
axios.get('/user/1').then((response) => {
console.log('Everything is awesome.');
}).catch((error) => {
console.warn('Not good man :(');
})
axios.get('/user/1').then((response) => {
console.log('Everything is awesome.');
}).catch((error) => {
console.warn('Not good man :(');
})