axios не возвращает ничего в catch error
Обычный post метод для регистрации Lara+Vue, у всех на видео норм приходит ответ, но почему то у меня ноль! Я спец не заполняю инпуты, сервер выдает ошибку, но в консоль лог не приходит! Что делать помогите плииис!
сам метод:
reg(){
axios.get('/sanctum/csrf-cookie')
.then(response => {
axios.post('/register', {
name: this.name,
email: this.email,
password: this.password,
password_confirmation: this.password_confirmation,
user_type: this.user_type
}
)
.then(res => {
console.log(res+'hhh');
localStorage.setItem('x_xsrf_token', res.config.headers['X-XSRF-TOKEN']);
location.reload('/personal/info');
})
.catch(error=>{
console.log(error);
})
})
}