-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Allow errors on arbitrary properties, not just defined attributes or relationships. #1984
Conversation
Thanks for this @alexspeller - my pull req for this (#1979) works, but doesn't have tests and doesn't pass Travis |
Oh, I didn't even see #1979 - I think the reason it failed was because forEach will fail on non-ember arrays if prototype extensions are off? Anways the approach looks basically the same in either case. |
@alexspeller no worries, mine doesn't have tests. 👍 |
Allow errors on arbitrary properties, not just defined attributes or relationships See emberjs/data#1984
@alexspeller any thoughts on when this might get merged in? |
As I already said I would like for this behavior to be optional... But if I am the only one to believe this, I suppose I will abandon my fight :) |
I heard your argument on the original issue, but I fail to see how this would bring inconsistencies. It's the backend that enforces schemas, so I believe the client should be flexible in that regard. Nonetheless, I'd love to see the PR you promised :D |
Until this gets merged in, you can add this to your app to get this functionality.
|
I just commented on #1977 as I intend to fix some problems that Ember Data currently has with error handling in my project:
I think if the serializer is enhanced to process/extract errors and allows errors to pass through then that is all that needs to be done. It is the right place to put this concern as serializers currently control the what and how of model serialization and The |
ping @tchak |
Any update on whether this is going to merged or not? |
IMO this should be merged. Since PR #2392 has been merged, error payload processing is now a serializer concern. There should be no reason not to include all errors that the serializer has sanctioned. ping @igorT, @alexspeller, @tchak |
If this will be merged I will update the PR. But if it will be unmerged for another 8 months there is no point as it will have to be rebased again. So if someone on the core team does want this, please ping me when you are ready so that I can make the changes. |
@igorT @alexspeller I am 👍 on merging this |
Awesome, I will rebase shortly |
6de5a86
to
df81ffa
Compare
df81ffa
to
785bb28
Compare
@tchak rebased and tests all passing :) |
Can this PR get some love? |
Allow errors on arbitrary properties, not just defined attributes or relationships.
Addresses #1877
@tchak @igorT ping