title: finally block running before try block ends db call
body: <p>I am performing input operation on db and trying to return response.</p>
  <pre><code>    var response = {}
      try {
          db.put({},(err, data) =&gt; {
              if(err) {
                  response[&quot;message&quot;] = err.message
                  response[&quot;code&quot;] = 400
              } else {
                  response[&quot;message&quot;] = &quot;Group created&quot;
                  response[&quot;code&quot;] = 201
                  response[&quot;body&quot;] = data.Item   
              }
          })
      } catch (error) {
          response['message'] = &quot;Something went wrong&quot;
          response['code'] = 500
      } finally {
          return response
      }
  </code></pre>
  <p>This code returns null object on success whereas when I tried setting timeout after the db call it returned full response.
  I think finally block runs without awaiting db call response.</p>