mercredi 13 juillet 2016

findRecord Rejects with successful network request

I am doing a simple find record. Getting an odd error.

store.findRecord('icon', id) // id = "UUID-ABC"
  .then((result) => {
    //do stuff
  })
  .catch((e) => {
    console.log(e)
  })

This fires off a network request and returns an object similar to ember docs. As seen in network dev tools:

{
  "icon": {
      "data": "string",
      "id": "UUID-ABC",
      "location": "string"
  }
}

Rejects with EmberError:

"Assertion Failed: Passing classes to store methods has been removed. Please pass a dasherized string instead of undefined"

But I don't understand what is undefined. The id is most definitely defined, as seen in the network return.

I'm the using standard DS.RESTAdapter. With very little other changes. I use a few other actions that return an array of icons model, and they work fine.No errors are reported.




Aucun commentaire:

Enregistrer un commentaire