Fix typo loose to lose

This commit is contained in:
Richard Zhang 2019-01-23 11:42:39 -05:00 committed by GitHub
parent 8c1782b50c
commit b7f40bd2e8
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.