Error Handling in Async Code
What parallel error handling pattern is shown?
Promise.all([
fetch('/api/1').catch(err => ({ error: err })),
fetch('/api/2').catch(err => ({ error: err })),
fetch('/api/3').catch(err => ({ error: err }))
]).then(results => {
results.forEach(result => {
if (result.error) {
handleError(result.error);
} else {
processResult(result);
}
});
});