[javascript] Handling errors in Promise.all