What cause "Error: Uncaught (in promise): Response with status:200 for Url:null" to show up?
<p>I'm accessing a Mongo database through NodeJS and Express as below:</p>
<pre><code>var MongoClient = require('mongodb').MongoClient;
    ...
    app.get(&quot;/app/visits&quot;, function (req, res, next) {
      console.log(&quot;get visits&quot;);
      MongoClient.connect('mongodb://localhost:27017/db', function (err, db) {
        if (!err) { console.log(&quot;We are connected&quot;); }
        visits = db.collection('visits', function (err, collection) { });
        visits.find().toArray(function (err, user) {
          this.user = JSON.stringify(user);
          if (err) { throw err; } else console.dir(this.user);
        });
        res.send(this.user);
      });
    });
</code></pre>
<p>In the browser this works fine. If I change <code>res.send(this.user);</code> to <code>res.status(301).send(this.user);</code> the status is also changed.
But the problem, Angular 2 with native script code returns the error:</p>
<pre><code>getActualVisits()
     {  
        return this.http.get(&quot;http://localhost:1234/app/visits&quot;).map(response =&gt; response.json())
      }
</code></pre>
<p>I have no idea WHY after 7 hours of trying repair that.
Method getActualVisits() is calling from:</p>
<pre><code> getActualSpecialization() {
    let v = this.getActualVisits();
...
}
</code></pre>