title: How to ignore errors using async/await syntax in JavaScript Promise.all()
body: <p>I am trying to run a for loop which queues a bunch of asynchronous requests. Once all the requests complete, independent of whether they <code>resolve</code> or <code>reject</code>, I want to then run some code. I am trying to take advantage of the async/await pattern, as it looks nicer. :)</p>
  
  <p>This is what I am doing:</p>
  
  <pre><code>var promises = []
  for ( item in list ) {
      prom = AsyncFunction( item )
      promises.push(prom)
  }
  
  await Promise.all(promises)
  
  doMoreAfter()
  </code></pre>
  
  <p>However, some of the promises fail, and the second that happens <code>Promise.all()</code> fails aswell.</p>
  
  <p>I want to simply ignore any failed promises, and have the next code run after all the promises have completed.</p>
  
  <p>I found solutions like <a href="https://stackoverflow.com/questions/31424561/wait-until-all-es6-promises-complete-even-rejected-promises/36115549#36115549">this</a>.</p>
  
  <pre><code>Promise.all([a(), b(), c()].map(p =&gt; p.catch(e =&gt; e)))
    .then(results =&gt; console.log(results)) // 1,Error: 2,3
    .catch(e =&gt; console.log(e));
  </code></pre>
  
  <p>But it doesn't look like it works when trying to turn it into the async/await format.</p>
  
  <pre><code>await Promise.all(promises.map(p =&gt; p.catch(e =&gt; e)))
  </code></pre>
  
  <p>What am I missing?</p>