{"action":"created","issue":{"url":"https://api.github.com/repos/digitalsadhu/loopback-component-jsonapi/issues/35","labels_url":"https://api.github.com/repos/digitalsadhu/loopback-component-jsonapi/issues/35/labels{/name}","comments_url":"https://api.github.com/repos/digitalsadhu/loopback-component-jsonapi/issues/35/comments","events_url":"https://api.github.com/repos/digitalsadhu/loopback-component-jsonapi/issues/35/events","html_url":"https://github.com/digitalsadhu/loopback-component-jsonapi/pull/35","id":113337780,"number":35,"title":"Update/clean up error handling","user":{"login":"digitalsadhu","id":1177098,"avatar_url":"https://avatars.githubusercontent.com/u/1177098?v=3","gravatar_id":"","url":"https://api.github.com/users/digitalsadhu","html_url":"https://github.com/digitalsadhu","followers_url":"https://api.github.com/users/digitalsadhu/followers","following_url":"https://api.github.com/users/digitalsadhu/following{/other_user}","gists_url":"https://api.github.com/users/digitalsadhu/gists{/gist_id}","starred_url":"https://api.github.com/users/digitalsadhu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/digitalsadhu/subscriptions","organizations_url":"https://api.github.com/users/digitalsadhu/orgs","repos_url":"https://api.github.com/users/digitalsadhu/repos","events_url":"https://api.github.com/users/digitalsadhu/events{/privacy}","received_events_url":"https://api.github.com/users/digitalsadhu/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-10-26T11:42:51Z","updated_at":"2015-10-26T16:02:43Z","closed_at":"2015-10-26T16:02:25Z","pull_request":{"url":"https://api.github.com/repos/digitalsadhu/loopback-component-jsonapi/pulls/35","html_url":"https://github.com/digitalsadhu/loopback-component-jsonapi/pull/35","diff_url":"https://github.com/digitalsadhu/loopback-component-jsonapi/pull/35.diff","patch_url":"https://github.com/digitalsadhu/loopback-component-jsonapi/pull/35.patch"},"body":"Fixes #22 \r\n\r\nCleans up error handling, adds additional tests and comments.\r\nAdds debug usage through error module.\r\n\r\nThe main breaking change here is my interpretation of the JSON API spec to mean:\r\nPut specific http error codes in the error objects and generalise the main http error status code.\r\n\r\nEg.\r\n```js\r\n//Request\r\n//GET /posts/99999999 //doesn't exist\r\n\r\n//Response:\r\n//http status code: 400 <-- general 400 error code\r\n//response body:\r\n{\r\n  \"errors\": [\r\n    {\r\n      \"status\": 404, //<-- specific error code\r\n      \"detail\": \"...\",\r\n      //...\r\n    }\r\n  ]\r\n}\r\n```"},"comment":{"url":"https://api.github.com/repos/digitalsadhu/loopback-component-jsonapi/issues/comments/151186218","html_url":"https://github.com/digitalsadhu/loopback-component-jsonapi/pull/35#issuecomment-151186218","issue_url":"https://api.github.com/repos/digitalsadhu/loopback-component-jsonapi/issues/35","id":151186218,"user":{"login":"listepo","id":2510800,"avatar_url":"https://avatars.githubusercontent.com/u/2510800?v=3","gravatar_id":"","url":"https://api.github.com/users/listepo","html_url":"https://github.com/listepo","followers_url":"https://api.github.com/users/listepo/followers","following_url":"https://api.github.com/users/listepo/following{/other_user}","gists_url":"https://api.github.com/users/listepo/gists{/gist_id}","starred_url":"https://api.github.com/users/listepo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/listepo/subscriptions","organizations_url":"https://api.github.com/users/listepo/orgs","repos_url":"https://api.github.com/users/listepo/repos","events_url":"https://api.github.com/users/listepo/events{/privacy}","received_events_url":"https://api.github.com/users/listepo/received_events","type":"User","site_admin":false},"created_at":"2015-10-26T16:02:43Z","updated_at":"2015-10-26T16:02:43Z","body":"@digitalsadhu good work!! :+1: "}}