title: How to use single catch function for nested async await?
body: <p>I have this code:</p>
  
  <pre><code>on('connection', async(socket) =&gt; {
    try {
      const promises = members.map(async(member) =&gt; {
        try {
          const users = await User.find({})
          const _promises = users.map(async() =&gt; {
            try {
              //some code here
            } catch (err) {
              console.log(err)
            }
          })
          await Promise.all(_promises)
        } catch (err) {
          console.log(err)
        }
      })
      await Promise.all(promises)
    } catch (err) {
      console.log(err)
      throw err
    }
  })
  </code></pre>
  
  <p>As you can see I have a <code>try</code> <code>catch</code> for each nested <code>async</code> function. Would it be possible to tweak the code to use only a single <code>catch</code>, or to simplify things somehow?</p>