{"action":"created","issue":{"url":"https://api.github.com/repos/TryGhost/Ignition/issues/6","repository_url":"https://api.github.com/repos/TryGhost/Ignition","labels_url":"https://api.github.com/repos/TryGhost/Ignition/issues/6/labels{/name}","comments_url":"https://api.github.com/repos/TryGhost/Ignition/issues/6/comments","events_url":"https://api.github.com/repos/TryGhost/Ignition/issues/6/events","html_url":"https://github.com/TryGhost/Ignition/issues/6","id":179727509,"number":6,"title":"error design","user":{"login":"kirrg001","id":1160712,"avatar_url":"https://avatars.githubusercontent.com/u/1160712?v=3","gravatar_id":"","url":"https://api.github.com/users/kirrg001","html_url":"https://github.com/kirrg001","followers_url":"https://api.github.com/users/kirrg001/followers","following_url":"https://api.github.com/users/kirrg001/following{/other_user}","gists_url":"https://api.github.com/users/kirrg001/gists{/gist_id}","starred_url":"https://api.github.com/users/kirrg001/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kirrg001/subscriptions","organizations_url":"https://api.github.com/users/kirrg001/orgs","repos_url":"https://api.github.com/users/kirrg001/repos","events_url":"https://api.github.com/users/kirrg001/events{/privacy}","received_events_url":"https://api.github.com/users/kirrg001/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2016-09-28T09:48:58Z","updated_at":"2016-09-28T09:52:18Z","closed_at":null,"body":"The current error design is not good enough.\r\n\r\n```\r\nerr = new errors.NoPermissionError()\r\nerr instanceof errors.NoPermissionError\r\nerr instanceof Error\r\n```\r\n\r\nBoth are never true.\r\nThat is because: the `new` operator is used for the function `errors.NoPermissionError` and not for the wrapped created error.\r\n\r\nAnother thing:\r\nhttps://github.com/TryGhost/Patronus/blob/master/test/unit/lib_oauth.test.js#L165\r\nLet's not compare strings!When doing a global rename, these strings are NOT affected.\r\n"},"comment":{"url":"https://api.github.com/repos/TryGhost/Ignition/issues/comments/250122894","html_url":"https://github.com/TryGhost/Ignition/issues/6#issuecomment-250122894","issue_url":"https://api.github.com/repos/TryGhost/Ignition/issues/6","id":250122894,"user":{"login":"kirrg001","id":1160712,"avatar_url":"https://avatars.githubusercontent.com/u/1160712?v=3","gravatar_id":"","url":"https://api.github.com/users/kirrg001","html_url":"https://github.com/kirrg001","followers_url":"https://api.github.com/users/kirrg001/followers","following_url":"https://api.github.com/users/kirrg001/following{/other_user}","gists_url":"https://api.github.com/users/kirrg001/gists{/gist_id}","starred_url":"https://api.github.com/users/kirrg001/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kirrg001/subscriptions","organizations_url":"https://api.github.com/users/kirrg001/orgs","repos_url":"https://api.github.com/users/kirrg001/repos","events_url":"https://api.github.com/users/kirrg001/events{/privacy}","received_events_url":"https://api.github.com/users/kirrg001/received_events","type":"User","site_admin":false},"created_at":"2016-09-28T09:52:18Z","updated_at":"2016-09-28T09:52:18Z","body":"I suggest to go with this solution for the next version.\r\nhttps://github.com/kirrg001/Ghost/blob/c004fab3baefd9b9442ecf47b32597cab70a478a/core/server/errors.js"}}
{"actor":{"display_login":"kirrg001"}}