{"action":"created","issue":{"url":"https://api.github.com/repos/troyanskiy/ng2-resource-rest/issues/14","repository_url":"https://api.github.com/repos/troyanskiy/ng2-resource-rest","labels_url":"https://api.github.com/repos/troyanskiy/ng2-resource-rest/issues/14/labels{/name}","comments_url":"https://api.github.com/repos/troyanskiy/ng2-resource-rest/issues/14/comments","events_url":"https://api.github.com/repos/troyanskiy/ng2-resource-rest/issues/14/events","html_url":"https://github.com/troyanskiy/ng2-resource-rest/issues/14","id":155660584,"number":14,"title":"error handling  in   ./resources/UserRes.ts","user":{"login":"iloveyo123u1","id":6580897,"avatar_url":"https://avatars.githubusercontent.com/u/6580897?v=3","gravatar_id":"","url":"https://api.github.com/users/iloveyo123u1","html_url":"https://github.com/iloveyo123u1","followers_url":"https://api.github.com/users/iloveyo123u1/followers","following_url":"https://api.github.com/users/iloveyo123u1/following{/other_user}","gists_url":"https://api.github.com/users/iloveyo123u1/gists{/gist_id}","starred_url":"https://api.github.com/users/iloveyo123u1/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/iloveyo123u1/subscriptions","organizations_url":"https://api.github.com/users/iloveyo123u1/orgs","repos_url":"https://api.github.com/users/iloveyo123u1/repos","events_url":"https://api.github.com/users/iloveyo123u1/events{/privacy}","received_events_url":"https://api.github.com/users/iloveyo123u1/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2016-05-19T06:04:55Z","updated_at":"2016-05-19T06:12:01Z","closed_at":null,"body":"```\r\n......\r\n//./resources/UserRes.ts \r\n\r\nexport class UserRes extends Resource {   \r\n //error handling  in there\r\n\r\n     get(err){\r\n         if(error.status == 403){\r\n                 alert(\"please login\");\r\n                 this._router.navigate(['Login']);\r\n          } else if(error.status == 404)    {\r\n                 alert(\"not fund\");\r\n                 this._router.navigate(['Index']);\r\n          }\r\n\r\n      }\r\n     post(error){\r\n         if(error.status == 403){\r\n                 alert(\"please login\");\r\n                 this._router.navigate(['Login']);\r\n          } \r\n    }\r\n\r\n}\r\n\r\n```"},"comment":{"url":"https://api.github.com/repos/troyanskiy/ng2-resource-rest/issues/comments/220236285","html_url":"https://github.com/troyanskiy/ng2-resource-rest/issues/14#issuecomment-220236285","issue_url":"https://api.github.com/repos/troyanskiy/ng2-resource-rest/issues/14","id":220236285,"user":{"login":"iloveyo123u1","id":6580897,"avatar_url":"https://avatars.githubusercontent.com/u/6580897?v=3","gravatar_id":"","url":"https://api.github.com/users/iloveyo123u1","html_url":"https://github.com/iloveyo123u1","followers_url":"https://api.github.com/users/iloveyo123u1/followers","following_url":"https://api.github.com/users/iloveyo123u1/following{/other_user}","gists_url":"https://api.github.com/users/iloveyo123u1/gists{/gist_id}","starred_url":"https://api.github.com/users/iloveyo123u1/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/iloveyo123u1/subscriptions","organizations_url":"https://api.github.com/users/iloveyo123u1/orgs","repos_url":"https://api.github.com/users/iloveyo123u1/repos","events_url":"https://api.github.com/users/iloveyo123u1/events{/privacy}","received_events_url":"https://api.github.com/users/iloveyo123u1/received_events","type":"User","site_admin":false},"created_at":"2016-05-19T06:12:01Z","updated_at":"2016-05-19T06:12:01Z","body":"we need to be more convenient to handle the error\r\n\r\n"}}