mardi 21 mars 2017

Ember data Error: the adapter's response did not have any data

I just upgraded an app from Ember 1.13 to Ember 2.12. Now my attempts to load the data store are failing. This line:

return this.store.find('blog', 14);

generates this error: "Error while processing route: blogs.index Assertion Failed: You made a findRecord request for a blog with id 14, but the adapter's response did not have any data".

But the data is arriving, and in this format:

{ "blogs": { "id": 14, "person_id": "1", "access": "3" } }

My adapter is specified in application/adapter.js as:

export default DS.RESTAdapter.extend({

host: "http://localhost", namespace: 'api-rick'

});

Anyone know why I'm getting this error? I think the JSON is properly formatted -- didn't have any problems before I upgraded Ember.




Aucun commentaire:

Enregistrer un commentaire