Throw in a promise stops the rest of the promises in the pool from continuing
Alqueraf opened this issue · 1 comments
Hi,
Once I get an error from a promise (that I catch in the eventListener for 'rejected') the rest of the promises don't get executed and the promisepool enters pool.start().catch(error => {//code}) directly.
One example, the promisepool had 132 promises to fulfill with a concurrency of 10. Around the 12th promise it entered the rejected, then the start().catch and stopped.
The specific error message that is throwing is Deadline Exceeded
, from Firebase Functions
Is that a bug or a miss-configuration from my side?
I can provide sample code if required.
This is the intended behavior. It's basically modeled after Promise.all()
. If you're looking to not abort execution, my suggestion would be to catch rejections from the individual promises and handle them separately.