mardi 24 octobre 2017

Handling errors in ember

How I can read error message and HTTP error status in catch callbcak?

Error handling in Ember Data: 2.16.2 a little bit confusing.

Problem appear when query return HTTP 401 Unauthorized with data {error: "Not authorized"}. err does't contain error and http code (in my case err == true)

this.store.query('user', {
            someParam: val
          }).then((model) => {
            ....
          }).catch((err) => {
             console.log(err)
          });




Aucun commentaire:

Enregistrer un commentaire