I am trying to catch error in
this.$http.post('http://127.0.0.1:8000/api/address/store',address_data,{headers: {'Authorization': 'Bearer ' + this.$auth.getToken()}}).then(response => {
if(response.status == 422) {
console.log('hello')
console.log(response)
}
})
But I can't catch in this way. Thanks.