Merge pull request #752 from richardzhang2/patch-1

Fix typo loose to lose
This commit is contained in:
Ilya Kantor 2019-01-24 14:21:07 +03:00 committed by GitHub
commit eb3f7f458b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -25,7 +25,7 @@ Promise.all(urls.map(url => fetch(url)))
});
```
The problem is that if any of requests fails, then `Promise.all` rejects with the error, and we loose results of all the other requests. So the code above is not fault-tolerant, just like the one in the previous task.
The problem is that if any of requests fails, then `Promise.all` rejects with the error, and we lose results of all the other requests. So the code above is not fault-tolerant, just like the one in the previous task.
Modify the code so that the array in the line `(*)` would include parsed JSON for successful requests and error for errored ones.