What version of bluebird is the issue happening on? 3.3.5
What platform and version? NodeJS 5.7.1
Promise.map() takes as a third parameter an options object accepting a single property to define the iteration concurrency limit. Because there is only one option I often mistake this object as a concurrency argument and provide an integer instead of the right object.
Bluebird silently ignores the bad parameter and keeps an infinite concurrency witch causes unknown stress to the server if iterating over a huge dataset. It should throw an exception if the parameter is truthy but not an object to avoid such mistakes.
The text was updated successfully, but these errors were encountered:
It's always tricky to find and prevent invalid calls to an API at runtime, there are so many ways to mess things up. However, I think the DefinitelyTyped definitions for Bluebird would have caught this error at compile time if you were using TypeScript. It would even warn you if the object had invalid options.