jeudi 28 mai 2015

Fetched records in Ember Data are saved in the store even if the call returned 401

When I'm not logged in and go to a route that will fetch a record from my api it will result in status code 401. The error will be handled in the application route and will transition to the login page. When I've logged in the failed transition will be retried.

The problem is that the route will ask the store for the record that is already saved in the store and a new error will be triggered since it doesn't know that I now am authorized to access the record.

Is there any way to tell the store to refetch all records that have received 401?




Aucun commentaire:

Enregistrer un commentaire