samedi 9 juillet 2016

Ember JS queryRecord not triggering error state when record not found

I have a model hook on a route that ends by returning a Promise like:

return route.store.queryRecord(model, {username: params.username});

This works great except it doesn't trigger the "error" action that is anywhere in the chain. It is getting a 404 and logging the error in the console.

If I change the call to "find" with a id that doesn't exist it throws the same 404, but calls the transition to the error state. I cannot use the find for several reasons. Am I missing something simple?

Using ember 2.4.




Aucun commentaire:

Enregistrer un commentaire