Question · JavaScript and TypeScript course · Module 4: Asynchronous JavaScript

Error Handling in Promise.all

What happens when one of the Promises in Promise.all() gets rejected?

Answer options

  • The remaining Promises continue to execute and the rejected one is skipped
  • Promise.all automatically retries the rejected Promise
  • The entire Promise.all gets rejected with the error of the first rejected Promise
  • Promise.all waits for all and returns an array of errors

You can check the correct answer by solving this task in the CodeWorlds game.