{"action":"created","issue":{"url":"https://api.github.com/repos/emberjs/data/issues/2658","labels_url":"https://api.github.com/repos/emberjs/data/issues/2658/labels{/name}","comments_url":"https://api.github.com/repos/emberjs/data/issues/2658/comments","events_url":"https://api.github.com/repos/emberjs/data/issues/2658/events","html_url":"https://github.com/emberjs/data/pull/2658","id":53321804,"number":2658,"title":"[WIP] errors object with sources","user":{"login":"tchak","id":12428,"avatar_url":"https://avatars.githubusercontent.com/u/12428?v=3","gravatar_id":"","url":"https://api.github.com/users/tchak","html_url":"https://github.com/tchak","followers_url":"https://api.github.com/users/tchak/followers","following_url":"https://api.github.com/users/tchak/following{/other_user}","gists_url":"https://api.github.com/users/tchak/gists{/gist_id}","starred_url":"https://api.github.com/users/tchak/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tchak/subscriptions","organizations_url":"https://api.github.com/users/tchak/orgs","repos_url":"https://api.github.com/users/tchak/repos","events_url":"https://api.github.com/users/tchak/events{/privacy}","received_events_url":"https://api.github.com/users/tchak/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-01-04T01:53:26Z","updated_at":"2015-01-04T02:01:46Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/emberjs/data/pulls/2658","html_url":"https://github.com/emberjs/data/pull/2658","diff_url":"https://github.com/emberjs/data/pull/2658.diff","patch_url":"https://github.com/emberjs/data/pull/2658.patch"},"body":"In this PR I am trying to address a few limitations of `errors` object.\r\n\r\n- fix enumerable subclassing by using `Ember.Array` instead\r\n- allow for several sources for errors\r\n- this should also allow for per validator `remove` / `clear` (each validator can be a different source)\r\n\r\nThis should make it easier to integrate with third partie libraries like `ember-validations` by only triggering invalid state for internal `adapter` source. Proposed changes should also allow for per-validator errors. It should make it easier to implement live client validations, as requested by @bcardarella.\r\n\r\nFinally, I know @bcardarella, you are not the biggest fan of how things gone in the past regarding `errors`. I really hope we can iron things out and make it work for core and third party libraries. I am looking forward to work with you on making `ember-validations` play nice with `ember-data`.\r\n\r\nI will add some examples and use cases tomorrow. It is getting late around here and I had enough headache with this for tonight :) Any feedback is welcome, but if something is really unclear, hang tight for tomorrow, for more examples and tests.\r\n\r\ncc @igorT "},"comment":{"url":"https://api.github.com/repos/emberjs/data/issues/comments/68617610","html_url":"https://github.com/emberjs/data/pull/2658#issuecomment-68617610","issue_url":"https://api.github.com/repos/emberjs/data/issues/2658","id":68617610,"user":{"login":"bcardarella","id":18524,"avatar_url":"https://avatars.githubusercontent.com/u/18524?v=3","gravatar_id":"","url":"https://api.github.com/users/bcardarella","html_url":"https://github.com/bcardarella","followers_url":"https://api.github.com/users/bcardarella/followers","following_url":"https://api.github.com/users/bcardarella/following{/other_user}","gists_url":"https://api.github.com/users/bcardarella/gists{/gist_id}","starred_url":"https://api.github.com/users/bcardarella/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bcardarella/subscriptions","organizations_url":"https://api.github.com/users/bcardarella/orgs","repos_url":"https://api.github.com/users/bcardarella/repos","events_url":"https://api.github.com/users/bcardarella/events{/privacy}","received_events_url":"https://api.github.com/users/bcardarella/received_events","type":"User","site_admin":false},"created_at":"2015-01-04T02:01:46Z","updated_at":"2015-01-04T02:01:46Z","body":"To be honest I would prefer if all of this was completely removed from Ember Data. I don't think Ember Data should have any functionality handling the error state beyond a hook for other libraries to take advantage of. When libraries like ember-validations are brought in now the asset footprint is unnecessarily increased as ember-validations will discard most of what Ember Data does. If this was all extracted out to a library like an Ember Data Errors or something like that then the end-user could swap out as they desire."}}