{"action":"created","issue":{"url":"https://api.github.com/repos/kurko/ember-json-api/issues/29","labels_url":"https://api.github.com/repos/kurko/ember-json-api/issues/29/labels{/name}","comments_url":"https://api.github.com/repos/kurko/ember-json-api/issues/29/comments","events_url":"https://api.github.com/repos/kurko/ember-json-api/issues/29/events","html_url":"https://github.com/kurko/ember-json-api/issues/29","id":42518369,"number":29,"title":"Ember Data tries to find model for 'error' when returning error messages","user":{"login":"egeriis","id":579824,"avatar_url":"https://avatars.githubusercontent.com/u/579824?v=3","gravatar_id":"","url":"https://api.github.com/users/egeriis","html_url":"https://github.com/egeriis","followers_url":"https://api.github.com/users/egeriis/followers","following_url":"https://api.github.com/users/egeriis/following{/other_user}","gists_url":"https://api.github.com/users/egeriis/gists{/gist_id}","starred_url":"https://api.github.com/users/egeriis/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/egeriis/subscriptions","organizations_url":"https://api.github.com/users/egeriis/orgs","repos_url":"https://api.github.com/users/egeriis/repos","events_url":"https://api.github.com/users/egeriis/events{/privacy}","received_events_url":"https://api.github.com/users/egeriis/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/kurko/ember-json-api/labels/bug","name":"bug","color":"fc2929"}],"state":"open","locked":false,"assignee":null,"milestone":{"url":"https://api.github.com/repos/kurko/ember-json-api/milestones/1","html_url":"https://github.com/kurko/ember-json-api/milestones/stabilization-beta","labels_url":"https://api.github.com/repos/kurko/ember-json-api/milestones/1/labels","id":788881,"number":1,"title":"stabilization-beta","description":null,"creator":{"login":"kurko","id":70312,"avatar_url":"https://avatars.githubusercontent.com/u/70312?v=3","gravatar_id":"","url":"https://api.github.com/users/kurko","html_url":"https://github.com/kurko","followers_url":"https://api.github.com/users/kurko/followers","following_url":"https://api.github.com/users/kurko/following{/other_user}","gists_url":"https://api.github.com/users/kurko/gists{/gist_id}","starred_url":"https://api.github.com/users/kurko/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kurko/subscriptions","organizations_url":"https://api.github.com/users/kurko/orgs","repos_url":"https://api.github.com/users/kurko/repos","events_url":"https://api.github.com/users/kurko/events{/privacy}","received_events_url":"https://api.github.com/users/kurko/received_events","type":"User","site_admin":false},"open_issues":3,"closed_issues":5,"state":"open","created_at":"2014-09-14T05:04:54Z","updated_at":"2015-10-02T11:11:39Z","due_on":null,"closed_at":null},"comments":1,"created_at":"2014-09-11T12:30:42Z","updated_at":"2015-10-02T11:12:00Z","closed_at":null,"body":"Per jsonapi.org spec it should be possible to pass errors alone or alongside other payload. But it appears that ember-json-api doesn't handle this correctly, as Ember Data is trying to look for an error model when I return an `errors` array with my payload.\r\n\r\nExample payload:\r\n\r\n```json\r\n{\r\n  \"goals\": [\r\n    {\r\n      \"id\": 2,\r\n      \"badge_id\": 5,\r\n      \"target\": 100,\r\n      \"target_type\": \"actions\",\r\n      \"target_title\": \"\",\r\n      \"target_description\": \"\",\r\n      \"start\": \"2014-09-18\",\r\n      \"end\": \"2014-09-25\",\r\n      \"name\": \"My goal\",\r\n      \"description\": \"Nullam quis risus eget urna mollis ornare vel eu leo. Donec sed odio dui. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Cras justo odio, dapibus ac facilisis in, egestas eget quam. Nulla vitae elit libero, a pharetra augue. Lorem ipsum dolor sit amet, consectetur adipiscing elit.\",\r\n      \"visible_to\": \"select\",\r\n      \"created_at\": \"2014-09-11 10:48:08\",\r\n      \"updated_at\": \"2014-09-11 10:48:08\",\r\n      \"deleted_at\": null,\r\n      \"links\": {\r\n        \"category\": 2\r\n      }\r\n    },\r\n    {\r\n      \"id\": 3,\r\n      \"badge_id\": 5,\r\n      \"target\": 150,\r\n      \"target_type\": \"actions\",\r\n      \"target_title\": \"\",\r\n      \"target_description\": \"\",\r\n      \"start\": \"2014-09-19\",\r\n      \"end\": \"2014-09-25\",\r\n      \"name\": \"ABC\",\r\n      \"description\": \"Nulla vitae elit libero, a pharetra augue. Etiam porta sem malesuada magna mollis euismod. Morbi leo risus, porta ac consectetur ac, vestibulum at eros. Nullam quis risus eget urna mollis ornare vel eu leo. Morbi leo risus, porta ac consectetur ac, vestibulum at eros. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus.\",\r\n      \"visible_to\": \"select\",\r\n      \"created_at\": \"2014-09-11 10:51:07\",\r\n      \"updated_at\": \"2014-09-11 10:55:53\",\r\n      \"deleted_at\": null,\r\n      \"links\": {\r\n        \"category\": 2\r\n      }\r\n    }\r\n  ],\r\n  \"errors\": [\r\n    {\r\n      \"code\": 2,\r\n      \"title\": \"Unknown linked resources requested\",\r\n      \"description\": \"These linked resources are not available: departments\"\r\n    }\r\n  ]\r\n}\r\n```"},"comment":{"url":"https://api.github.com/repos/kurko/ember-json-api/issues/comments/144992325","html_url":"https://github.com/kurko/ember-json-api/issues/29#issuecomment-144992325","issue_url":"https://api.github.com/repos/kurko/ember-json-api/issues/29","id":144992325,"user":{"login":"jonkoops","id":695720,"avatar_url":"https://avatars.githubusercontent.com/u/695720?v=3","gravatar_id":"","url":"https://api.github.com/users/jonkoops","html_url":"https://github.com/jonkoops","followers_url":"https://api.github.com/users/jonkoops/followers","following_url":"https://api.github.com/users/jonkoops/following{/other_user}","gists_url":"https://api.github.com/users/jonkoops/gists{/gist_id}","starred_url":"https://api.github.com/users/jonkoops/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jonkoops/subscriptions","organizations_url":"https://api.github.com/users/jonkoops/orgs","repos_url":"https://api.github.com/users/jonkoops/repos","events_url":"https://api.github.com/users/jonkoops/events{/privacy}","received_events_url":"https://api.github.com/users/jonkoops/received_events","type":"User","site_admin":false},"created_at":"2015-10-02T11:12:00Z","updated_at":"2015-10-02T11:12:00Z","body":"I am closing this issue due to lack of activity and the impending deprecation in favour of the official Ember Data adapter. If you think this is an issue that relates to Ember Data please [report the issue](https://github.com/emberjs/data/issues/new) there."}}