Skip to content
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

Rely on active model serializer to handle error logic #3076

Merged
merged 2 commits into from May 18, 2015
Merged

Rely on active model serializer to handle error logic #3076

merged 2 commits into from May 18, 2015

Conversation

ghost
Copy link

@ghost ghost commented May 18, 2015

This pull request reverts the changes in #3030, I'd overlooked the role AMS played in error handling and got distracted by some broken tests. Sorry guys.

Kudos to @pangratz for putting together an integration test to make sure the errors hash does indeed get passed through correctly and camelized as expected.

Fixes #3067, cc @fivetanley

Ben Holmes added 2 commits May 17, 2015 20:17
The changes in e928355 doesn't make the behaviour as backwards compatible as
we would like. The changes would break existing systems that do depend on a
snake case errors hash as we've seen in #3067.

For now restore the original behaviour so that we can make a release. We should
make a decision at some point whether to use the documented interface for
`InvalidError` or to change the interface.

Part of the issue here is that we don't have an integration test to qualify that
the errors hash gets read correctly and camelized. There's been some confusion
as to whether or not ember data actually does this.
Thanks to @pangratz for putting this test together. Currently we only have tests
for the adapter and serializer correctly behaving in isolation.
fivetanley added a commit that referenced this pull request May 18, 2015
Rely on active model serializer to handle error logic
@fivetanley fivetanley merged commit 1f2ed3f into emberjs:master May 18, 2015
@fivetanley
Copy link
Member

thanks! 🎉

@igorT
Copy link
Member

igorT commented May 18, 2015

👍

@pangratz
Copy link
Member

😍

@ghost ghost deleted the bug/3067 branch May 18, 2015 09:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

ActiveModelSerializer errors hash expecting camelcased properties instead of underscored properties in beta.17
3 participants