0👍
✅
Try it like this :
axios.post('storeProduct', data,
{
headers : header(state)
})
.then(response => console.log(response.data))
.catch(error => {
if (error.response) {
console.log("you are at error");
console.log(error.response);
}
});
Source:stackexchange.com