Is there a more robust method than forkJoin
to run multiple requests in parallel and handle failed subscriptions without cancelling the rest? I need a solution that allows all requests to complete even if one fails. Here's a scenario:
const posts = this.http.get("https://myApi.com/posts?userId=1");
const albums = this.http.get("https://myApi.com/albums?userId=1");
forkJoin([posts, albums]).subscribe((result) => {
this.combineResults(result[0], result[1]);
});
combineResults(res1, res2) {
const message = res1.text + res2.text;
console.log(message);
}