{"action":"created","issue":{"url":"https://api.github.com/repos/petkaantonov/bluebird/issues/762","labels_url":"https://api.github.com/repos/petkaantonov/bluebird/issues/762/labels{/name}","comments_url":"https://api.github.com/repos/petkaantonov/bluebird/issues/762/comments","events_url":"https://api.github.com/repos/petkaantonov/bluebird/issues/762/events","html_url":"https://github.com/petkaantonov/bluebird/issues/762","id":106152174,"number":762,"title":"Timeout error custom error object?","user":{"login":"leshy","id":681516,"avatar_url":"https://avatars.githubusercontent.com/u/681516?v=3","gravatar_id":"","url":"https://api.github.com/users/leshy","html_url":"https://github.com/leshy","followers_url":"https://api.github.com/users/leshy/followers","following_url":"https://api.github.com/users/leshy/following{/other_user}","gists_url":"https://api.github.com/users/leshy/gists{/gist_id}","starred_url":"https://api.github.com/users/leshy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/leshy/subscriptions","organizations_url":"https://api.github.com/users/leshy/orgs","repos_url":"https://api.github.com/users/leshy/repos","events_url":"https://api.github.com/users/leshy/events{/privacy}","received_events_url":"https://api.github.com/users/leshy/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-09-12T12:20:01Z","updated_at":"2015-09-12T12:49:44Z","closed_at":null,"body":"Hi, I'd like to provide some extra data apart from a string when my promise timeouts,\r\n\r\nfor example, I might subclass TimeoutError to ConnectionTimeoutError that also has an attribute containing a specific xhr request for futher inspection/custom error messaging\r\n\r\nis this something that hasn't been anticipated or am I missing something?\r\n\r\nwouldn't it be way nicer if .timeout checked if it received an instance of an Error object and instantiate TimeoutError only if it didn't? (other types apart from String or Error instances can be handled in a few different ways depending on how strict you'd like to be)\r\n\r\nThanks!"},"comment":{"url":"https://api.github.com/repos/petkaantonov/bluebird/issues/comments/139758107","html_url":"https://github.com/petkaantonov/bluebird/issues/762#issuecomment-139758107","issue_url":"https://api.github.com/repos/petkaantonov/bluebird/issues/762","id":139758107,"user":{"login":"leshy","id":681516,"avatar_url":"https://avatars.githubusercontent.com/u/681516?v=3","gravatar_id":"","url":"https://api.github.com/users/leshy","html_url":"https://github.com/leshy","followers_url":"https://api.github.com/users/leshy/followers","following_url":"https://api.github.com/users/leshy/following{/other_user}","gists_url":"https://api.github.com/users/leshy/gists{/gist_id}","starred_url":"https://api.github.com/users/leshy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/leshy/subscriptions","organizations_url":"https://api.github.com/users/leshy/orgs","repos_url":"https://api.github.com/users/leshy/repos","events_url":"https://api.github.com/users/leshy/events{/privacy}","received_events_url":"https://api.github.com/users/leshy/received_events","type":"User","site_admin":false},"created_at":"2015-09-12T12:49:44Z","updated_at":"2015-09-12T12:49:44Z","body":"awesome! thanks"}}