{"action":"created","issue":{"url":"https://api.github.com/repos/rwoll/submission/issues/43","repository_url":"https://api.github.com/repos/rwoll/submission","labels_url":"https://api.github.com/repos/rwoll/submission/issues/43/labels{/name}","comments_url":"https://api.github.com/repos/rwoll/submission/issues/43/comments","events_url":"https://api.github.com/repos/rwoll/submission/issues/43/events","html_url":"https://github.com/rwoll/submission/issues/43","id":157764476,"number":43,"title":"Don't .catch(reject)","user":{"login":"mgree","id":505088,"avatar_url":"https://avatars.githubusercontent.com/u/505088?v=3","gravatar_id":"","url":"https://api.github.com/users/mgree","html_url":"https://github.com/mgree","followers_url":"https://api.github.com/users/mgree/followers","following_url":"https://api.github.com/users/mgree/following{/other_user}","gists_url":"https://api.github.com/users/mgree/gists{/gist_id}","starred_url":"https://api.github.com/users/mgree/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mgree/subscriptions","organizations_url":"https://api.github.com/users/mgree/orgs","repos_url":"https://api.github.com/users/mgree/repos","events_url":"https://api.github.com/users/mgree/events{/privacy}","received_events_url":"https://api.github.com/users/mgree/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/rwoll/submission/labels/technical%20debt","name":"technical debt","color":"bfd4f2"}],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2016-05-31T20:36:53Z","updated_at":"2016-06-01T04:49:36Z","closed_at":"2016-06-01T04:49:36Z","body":"Apparently this is redundant."},"comment":{"url":"https://api.github.com/repos/rwoll/submission/issues/comments/222891837","html_url":"https://github.com/rwoll/submission/issues/43#issuecomment-222891837","issue_url":"https://api.github.com/repos/rwoll/submission/issues/43","id":222891837,"user":{"login":"mgree","id":505088,"avatar_url":"https://avatars.githubusercontent.com/u/505088?v=3","gravatar_id":"","url":"https://api.github.com/users/mgree","html_url":"https://github.com/mgree","followers_url":"https://api.github.com/users/mgree/followers","following_url":"https://api.github.com/users/mgree/following{/other_user}","gists_url":"https://api.github.com/users/mgree/gists{/gist_id}","starred_url":"https://api.github.com/users/mgree/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mgree/subscriptions","organizations_url":"https://api.github.com/users/mgree/orgs","repos_url":"https://api.github.com/users/mgree/repos","events_url":"https://api.github.com/users/mgree/events{/privacy}","received_events_url":"https://api.github.com/users/mgree/received_events","type":"User","site_admin":false},"created_at":"2016-06-01T04:49:36Z","updated_at":"2016-06-01T04:49:36Z","body":"It is, in fact, not redundant. If we remove the `.catch(reject)` and cause an exception, we get:\r\n\r\n```\r\nUnhandled rejection Error: Not authorized to enroll.\r\n    at .<anonymous> (/Users/mgree/submission/src/server/dbwrap.js:572:15)\r\n    at tryCatcher (/Users/mgree/submission/node_modules/bluebird/js/release/util.js:16:23)\r\n    at Promise._settlePromiseFromHandler (/Users/mgree/submission/node_modules/bluebird/js/release/promise.js:502:31)\r\n    at Promise._settlePromise (/Users/mgree/submission/node_modules/bluebird/js/release/promise.js:559:18)\r\n    at Promise._settlePromise0 (/Users/mgree/submission/node_modules/bluebird/js/release/promise.js:604:10)\r\n    at Promise._settlePromises (/Users/mgree/submission/node_modules/bluebird/js/release/promise.js:683:18)\r\n    at Async._drainQueue (/Users/mgree/submission/node_modules/bluebird/js/release/async.js:138:16)\r\n    at Async._drainQueues (/Users/mgree/submission/node_modules/bluebird/js/release/async.js:148:10)\r\n    at Immediate.Async.drainQueues [as _onImmediate] (/Users/mgree/submission/node_modules/bluebird/js/release/async.js:17:14)\r\n    at tryOnImmediate (timers.js:543:15)\r\n    at processImmediate [as _immediateCallback] (timers.js:523:5)\r\n```\r\n\r\nSo in fact this is the correct behavior. Why it's not the _default_ behavior, I have no idea."}}
{"actor":{"display_login":"mgree"}}