-
Notifications
You must be signed in to change notification settings - Fork 391
Open
Description
This is my when.reduce code
return reduce(cmds, function(responses, cmd) {
return processor(cmd).then(function(response) {
responses.push(response);
return responses;
})
}, [])
any rejection in processoror lower gets hung (unhandled) at when.reduce
(node:7520) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 2): manual rejection in processor**Command Processing Errors** manual rejection in processor
(node:7520) PromiseRejectionHandledWarning: Promise rejection was handled asynchronously (rejection id: 2)
on the other hand...resolutions bubble up fine
FINAL response back [ 'manual resolution in processor' ]
to make sure it is when reduce I substituted this
return processor(cmds[0]);
and yes both resolutions and rejections bubble on through.
Is there an error in my construction of the reducer function or is this a bug?
Note I am using the latest version of nodejs 6.9.1 which since 6.0 now throws these warnings for any unhandled rejections
Metadata
Metadata
Assignees
Labels
No labels