-
Notifications
You must be signed in to change notification settings - Fork 49
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add support for ajax errors. #35
Conversation
The CRUD integration tests have also been cleaned up a bit.
The commit relies on the error serialization that was added in Ember Data v1.0.0-beta.12. emberjs/data@4884933
It's also possible to write some unit tests for this similar to what is done for the active model adapter. |
@holandes22 If you have a chance it would be great if you could try out this feature. This is based on something I'm already using but it's always nice to get another person to try it out as well. |
@benkonrath sure thing. Sorry I've been absent lately, completely swamped with work. Been wanting to try ED beta 12 + DRF 3.0, so was planning to clear some space over the weekend, and I'll give this a go then too. |
@holandes22 No worries, I know the feeling. :) |
What is the status on this? |
It's waiting for review. The open question is: Are the tests ok? Or should I add some unit tests as well or instead of what I have. |
I like how the activemodel adapter unit tests you linked to do a quick spot check on ajaxError method output. If we can mimic that here I think this is otherwise good to go. Great work on the integration tests. |
Also: * Modified ajaxError() to make the behaviour more explicit when the responseText can't be parsed. * Improved comments.
The active model tests are slightly outdated because you can no longer test for the camelCase transformation in |
Add support for ajax errors.
This improvement make the adapter require Ember Data v1.0.0-beta.12 as it uses the error serialization support that was recently added to Ember Data.