title: NodeJS: TypeError: Converting circular structure to JSON
body: <p>I made a HTTP API using <code>Express</code> in <code>Node.js</code> for CRUD operations. This works partly, but when I make a <code>GET</code> request an error shows up: 
  <code>TypeError: Converting circular structure to JSON</code>.
  Other HTTP methods (e.g. <code>POST</code> and <code>DELETE</code>) do work.</p>
  
  <p>This is my model: </p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>const mongoose = require('mongoose');
  
  const coment = mongoose.Schema({
      _id: mongoose.Schema.Types.ObjectId,
      text: {type: String, required: true},
      author_coment: {type: mongoose.Schema.Types.ObjectId, ref: 'User'},
      date: {type: Date, default: Date.now}
  });
  
  const vote = mongoose.Schema({
      _id: mongoose.Schema.Types.ObjectId,
      author_vote: {type: mongoose.Schema.Types.ObjectId, ref: 'User'},
      vote: {type: Boolean, required: true},
      date: {type: Date, default: Date.now}
  })
  
  
  const book = mongoose.Schema({
      _id: mongoose.Schema.Types.ObjectId,
      title: {type: String, required: true},
      author: {type: mongoose.Schema.Types.ObjectId, ref: 'User'},
      sinopsis: {type: String, required: true},
      text: {type: mongoose.Schema.Types.ObjectId, ref: 'Text'},
      creation_date:  {type: Date, default: Date.now},
      cover: {type: String},
      coments: [coment],
      votes: [vote]
  });
  
  
  
  module.exports = mongoose.model('Book', book);</code></pre>
  </div>
  </div>
  </p>
  
  <p>This is my <code>GET</code> function: </p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>// [GET: Book info]
  router.get('/info/:book_id', function (req, res) {
      Book.findById(req.params.book_id, (err, book) =&gt; {
          if (err) return res.status(500).send(err);
          res.status(200).send(book);
      });
  });</code></pre>
  </div>
  </div>
  </p>
  
  <p>Here is my User model:</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>const mongoose = require('mongoose');
  
  const user = mongoose.Schema({
      _id: mongoose.Schema.Types.ObjectId,
      name: {type: String, required: true},
      email: {type: String, required: true},
      password: {type: String, required: true}
  });
  
  module.exports = mongoose.model('User', user);</code></pre>
  </div>
  </div>
  </p>
  
  <p>Edit: </p>
  
  <p>After some digging, I found out what was the problem, I had another function that had this url: <code>/: skip/: talk</code>so it was executed that one instead of what I wanted.</p>