Use allSettled instead of all. If you want to wait for all of the promises to either be fulfilled or rejected, you can use allSettled.
updated example
Merge pull request #4 from panva/q-used-safer

Updated usage of Q and updated example.