Skip to content
This repository has been archived by the owner on Jan 30, 2023. It is now read-only.

Ember Data Mixin Breaks Adapter Level Error Handling #224

Open
jherdman opened this issue Jan 16, 2017 · 3 comments
Open

Ember Data Mixin Breaks Adapter Level Error Handling #224

jherdman opened this issue Jan 16, 2017 · 3 comments
Labels
Ember Data Mixin Issue relates to the Ember Data mixin that ships with `ember-ajax`

Comments

@jherdman
Copy link
Collaborator

In investigating how our Ember Data mixin works with a few of our apps at Precision Nutrition, I noticed that adapter level error handling is circumvented. This breaks applications by changing the expected shape of API errors.

@alexlafroscia alexlafroscia added the Ember Data Mixin Issue relates to the Ember Data mixin that ships with `ember-ajax` label Jan 16, 2017
@XaserAcheron
Copy link
Contributor

I'm a bit stumped on how best to actually implement a test for this. The acceptance test that exists for testing the ember-data integration doesn't allow (non-hacky) access to the actual model object, and I haven't quite figured out how to import everything necessary to make ED's store work in an integration test. Welp!

Ideally I'd like to be able to call store.findRecord directly and inspect the contents after success/failure to make sure everything's kosher, but that's an unusually difficult nut to crack. Anyone have any insight, by chance?

@jherdman
Copy link
Collaborator Author

I suppose we could set up an acceptance test scenario wherein a model has an active-model-adapter, and we look to see that the output from an error request aligns with what we expect.

@sumeetattree
Copy link

Not sure if this is related but I ran into a situation where the handleResponse of the underlying DS.JSONAPIAdaptor is being overriden and super is not called. It is causing problems with ember-simple-auth that relies on the adapter's handleResponse to detect whether a request failed with 401.

Is there a work around while some work is being done on this?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Ember Data Mixin Issue relates to the Ember Data mixin that ships with `ember-ajax`
Projects
None yet
Development

No branches or pull requests

4 participants