{"action":"created","issue":{"url":"https://api.github.com/repos/Raynos/error/issues/13","labels_url":"https://api.github.com/repos/Raynos/error/issues/13/labels{/name}","comments_url":"https://api.github.com/repos/Raynos/error/issues/13/comments","events_url":"https://api.github.com/repos/Raynos/error/issues/13/events","html_url":"https://github.com/Raynos/error/issues/13","id":111787514,"number":13,"title":"checking err is SomeTypedError?","user":{"login":"raine","id":11027,"avatar_url":"https://avatars.githubusercontent.com/u/11027?v=3","gravatar_id":"","url":"https://api.github.com/users/raine","html_url":"https://github.com/raine","followers_url":"https://api.github.com/users/raine/followers","following_url":"https://api.github.com/users/raine/following{/other_user}","gists_url":"https://api.github.com/users/raine/gists{/gist_id}","starred_url":"https://api.github.com/users/raine/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/raine/subscriptions","organizations_url":"https://api.github.com/users/raine/orgs","repos_url":"https://api.github.com/users/raine/repos","events_url":"https://api.github.com/users/raine/events{/privacy}","received_events_url":"https://api.github.com/users/raine/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-10-16T08:39:11Z","updated_at":"2015-10-16T18:40:26Z","closed_at":null,"body":"What is the right way to check an `err` is a `ServerError`?\r\n\r\n```js\r\nvar TypedError = require(\"error/typed\")\r\n\r\nvar ServerError = TypedError({\r\n    type: 'server.5xx',\r\n    message: '{title} server error, status={statusCode}',\r\n    title: null,\r\n    statusCode: null\r\n});\r\n\r\nvar error = new ServerError({\r\n    title:'some title',\r\n    statusCode: 500\r\n});\r\n\r\nerror instanceof ServerError // false\r\n```\r\n\r\nor by using `err.name`, `err.type` or `err.fullType`? (what are all these properties for?)\r\n\r\nThanks!"},"comment":{"url":"https://api.github.com/repos/Raynos/error/issues/comments/148801229","html_url":"https://github.com/Raynos/error/issues/13#issuecomment-148801229","issue_url":"https://api.github.com/repos/Raynos/error/issues/13","id":148801229,"user":{"login":"Raynos","id":479538,"avatar_url":"https://avatars.githubusercontent.com/u/479538?v=3","gravatar_id":"","url":"https://api.github.com/users/Raynos","html_url":"https://github.com/Raynos","followers_url":"https://api.github.com/users/Raynos/followers","following_url":"https://api.github.com/users/Raynos/following{/other_user}","gists_url":"https://api.github.com/users/Raynos/gists{/gist_id}","starred_url":"https://api.github.com/users/Raynos/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Raynos/subscriptions","organizations_url":"https://api.github.com/users/Raynos/orgs","repos_url":"https://api.github.com/users/Raynos/repos","events_url":"https://api.github.com/users/Raynos/events{/privacy}","received_events_url":"https://api.github.com/users/Raynos/received_events","type":"User","site_admin":false},"created_at":"2015-10-16T18:40:26Z","updated_at":"2015-10-16T18:40:26Z","body":"Err.type is designed for switch statements.\r\n\r\nThat's what we do :) "}}