Each then() should return a value or throw when using Promises : <p>I have a few async methods that I need to wait for completion before I return from the request. I'm using Promises, but I keep getting the error:</p>

<pre><code>Each then() should return a value or throw // promise/always-return
</code></pre>

<p>Why is this happpening? This is my code:</p>

<pre><code>router.get('/account', function(req, res) {
  var id = req.user.uid
  var myProfile = {}
  var profilePromise = new Promise(function(resolve, reject) {
    var userRef = firebase.db.collection('users').doc(id)
    userRef.get()
      .then(doc =&gt; { // Error occurs on this line
        if (doc.exists) {
          var profile = doc.data()
          profile.id = doc.id
          myProfile = profile
          resolve()
        } else {
          reject(Error("Profile doesn't exist"))
        }
      })
      .catch(error =&gt; {
        reject(error)
      })
  })
  // More promises further on, which I wait for
})
</code></pre>
