{"action":"created","issue":{"url":"https://api.github.com/repos/petkaantonov/bluebird/issues/727","labels_url":"https://api.github.com/repos/petkaantonov/bluebird/issues/727/labels{/name}","comments_url":"https://api.github.com/repos/petkaantonov/bluebird/issues/727/comments","events_url":"https://api.github.com/repos/petkaantonov/bluebird/issues/727/events","html_url":"https://github.com/petkaantonov/bluebird/issues/727","id":101152152,"number":727,"title":"spread doesn't seem to work for reject function","user":{"login":"DecSander","id":8240089,"avatar_url":"https://avatars.githubusercontent.com/u/8240089?v=3","gravatar_id":"","url":"https://api.github.com/users/DecSander","html_url":"https://github.com/DecSander","followers_url":"https://api.github.com/users/DecSander/followers","following_url":"https://api.github.com/users/DecSander/following{/other_user}","gists_url":"https://api.github.com/users/DecSander/gists{/gist_id}","starred_url":"https://api.github.com/users/DecSander/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DecSander/subscriptions","organizations_url":"https://api.github.com/users/DecSander/orgs","repos_url":"https://api.github.com/users/DecSander/repos","events_url":"https://api.github.com/users/DecSander/events{/privacy}","received_events_url":"https://api.github.com/users/DecSander/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-08-15T08:31:15Z","updated_at":"2015-12-09T16:48:18Z","closed_at":"2015-08-15T08:52:45Z","body":"The following doesn't seem to flatten the array passed to the reject function in processAccount. Basically, as far as I can tell, spread doesn't work for rejectedHandlers. However ... I may be wrong\r\n```JavaScript\r\nrouter.post('/login', function(req, res, next) {\r\n  getAccount(req, res, next).spread(processAccount).spread(loginSuccessful, loginFailed);\r\n});\r\n```"},"comment":{"url":"https://api.github.com/repos/petkaantonov/bluebird/issues/comments/163320609","html_url":"https://github.com/petkaantonov/bluebird/issues/727#issuecomment-163320609","issue_url":"https://api.github.com/repos/petkaantonov/bluebird/issues/727","id":163320609,"user":{"login":"ChezCrawford","id":5106881,"avatar_url":"https://avatars.githubusercontent.com/u/5106881?v=3","gravatar_id":"","url":"https://api.github.com/users/ChezCrawford","html_url":"https://github.com/ChezCrawford","followers_url":"https://api.github.com/users/ChezCrawford/followers","following_url":"https://api.github.com/users/ChezCrawford/following{/other_user}","gists_url":"https://api.github.com/users/ChezCrawford/gists{/gist_id}","starred_url":"https://api.github.com/users/ChezCrawford/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ChezCrawford/subscriptions","organizations_url":"https://api.github.com/users/ChezCrawford/orgs","repos_url":"https://api.github.com/users/ChezCrawford/repos","events_url":"https://api.github.com/users/ChezCrawford/events{/privacy}","received_events_url":"https://api.github.com/users/ChezCrawford/received_events","type":"User","site_admin":false},"created_at":"2015-12-09T16:48:18Z","updated_at":"2015-12-09T16:48:18Z","body":"I was confused by this as well.  The 2.x documentation for `.spread` states:\r\n\r\n> Like calling .then, but the fulfillment value or rejection reason must be an array, which is flattened to the formal parameters of the handlers.\r\n\r\nThe `s` on `handlers` led me to believe that this was true for both the fulfilled and rejected handlers.  @petkaantonov: I can put in a PR with additional clarity in the documentation if you tell me which branch(es) to submit against..."}}