Let's says we have a UsersIndexRoute where we load all users.
model() {
return this.store.findAll('users');
}
When we load the page for the first time (hard reload) and get a HTTP 500 errorback we get this error in the ApplicationRoute's errors() and can render a error page and everything is fine.
But: Let's says we already loaded the Ember App but only loaded a subset of all users, go to the /users page and call the findAll again, Ember immediately gives back the subset of users we already loaded in the store and fetches all the other users in a background request.
Now in our case we get a HTTP 500 error back in the backgroundReload, but it seems like http://ift.tt/1VqajfV doesn't return the promise array back and we can't catch the error in our findAll method anymore, or receiving any error in the ApplicationRoute's error().
My question is: how and where can I catch errors from backgroundReload?
Aucun commentaire:
Enregistrer un commentaire