title: Async/Await Promise Pending Error
body: <p>I'm having a bit of an issue with an error dealing with promises.
  So initially I had my function set up like this, and it all worked fine, no problems.</p>
  
  <p>Original:</p>
  
  <pre><code>const request = require("request-promise");
  async () =&gt; {
    const URL_HIDDEN = "...";
  
    let info = await request(URL_HIDDEN);
    info = JSON.parse(info).response.players[0];
  
    let playtime = await request(URL_HIDDEN);
    playtime = JSON.parse(playtime).response.games;
  
    console.log(info);
    console.log(playtime);
  }
  </code></pre>
  
  <p>This is a shortened version, but basically I am just requesting information from the Steam API. Both the variables get print out with all the data no problem, but that changes once I do the refactor below.</p>
  
  <p>Refactored:</p>
  
  <pre><code>const middleware = require("../middleware");
  async () =&gt; {
    const URL_HIDDEN = "...";
  
    let requests = middleware.requestURI(URL_HIDDEN);
    console.log(requests);
  }
  </code></pre>
  
  <p>and I started doing all the request handling in a separate function in a separate file.</p>
  
  <pre><code>const request = require("request-promise");
  middlewareObj.requestURI = async (URL_HIDDEN) =&gt; {
    console.log("1");
    let info = await request(URL_HIDDEN);
    info = JSON.parse(info).response.players[0];
  
    console.log("2");
  
    let playtime = await request(URL_HIDDEN);
    playtime = JSON.parse(playtime).response.games;
  
    console.log("3");
  
    return [{ info }, { playtime }];
  };
  </code></pre>
  
  <p>Once I got all the variables sorted out I want to return an array. However, once executed I get this printed to the console.</p>
  
  <pre><code>1
  Promise { &lt;pending&gt; }
  2
  3
  </code></pre>
  
  <p><strong>Any idea why it's printing promise pending once I refactored it?</strong> </p>
  
  <p>In the original it prints out everything perfectly fine</p>