Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Should be able to get resolved values when stopOnError=false #29

Closed
wholenews opened this issue Oct 1, 2020 · 2 comments
Closed

Should be able to get resolved values when stopOnError=false #29

wholenews opened this issue Oct 1, 2020 · 2 comments

Comments

@wholenews
Copy link

Should be able to get both resolved values, and aggregate error, like in p-settle. I'm looking for the combination of p-settle and p-map which seems not to exist...

With p-settle (even when supplying function) it's called immediately. In my case this starts all the requests at once.

With p-map it throttles the requests according to concurrency but there is no way to get the resolved results if any request fails.

@sindresorhus
Copy link
Owner

The concurrency option in p-settle should work: https://github.com/sindresorhus/p-settle/blob/071020fc6cd7884e74228d546943f53cbc3ca28c/test.js#L31 And if not, that's a bug.

You could also use https://github.com/sindresorhus/p-reflect with p-map.

@wholenews
Copy link
Author

Ah, you're right p-settle does work as intended. I must have misinterpreted the data. Thanks for a quick response!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants