kurko / ember-json-api

JSON API adapter for Ember Data.
MIT License
254 stars 62 forks source link

WIP fix error consumption #72

Closed oliverbarnes closed 9 years ago

oliverbarnes commented 9 years ago

Work in progress to massage error payloads so ember-data will add them to model.get('errors').

The extractErrors() override works for us on the application level, for a client's project, but when applying it to the add-on I'm still getting the same Encountered "errors" in payload, but no model was found for model name "error" message.

I found these checks under the extractSingle() and extractArray() methods, in ember-data:

var typeName  = this.typeForRoot(prop);

if (!store.modelFactoryFor(typeName)) {
  Ember.warn(this.warnMessageNoModelForKey(prop, typeName), false);
  continue;
}

I'm not sure how to get past them in overrides for above methods, yet. Any ideas?

closes #29

jonkoops commented 9 years ago

Closing this pull request since it has gone stale and no active development has taken place. @oliverbarnes If you think this is unjustified please let me know.