title: Catch error in API request in vue.js
body: <p>I am trying to catch error in </p>
  
  <pre><code>this.$http.post('http://127.0.0.1:8000/api/address/store',address_data,{headers: {'Authorization': 'Bearer ' + this.$auth.getToken()}}).then(response =&gt; {
                      if(response.status == 422) {
                          console.log('hello')
                          console.log(response)
                      }
              })
  </code></pre>
  
  <p>But I can't catch in this way. Thanks.</p>