How do I know when a transaction commit fails?
var obj = App.store.findAll(App.Todo).get('firstObject');
var t = App.store.transaction();
t.add(obj);
obj.set('summary','New Summary');
t.commit();
// 403 or 401 is returned from the server (request failed)
a.get('isLoading'); // true
a.get('isError'); // false
Use case: I want a user to see that his action (save object) failed.
Indeed, as of today, ember-data’s
RESTAdapterdoes not process errors on commit requests.You may be interested by the following PR which proposes errors handling support.