title: Error: Argument passed in must be a single String of 12 bytes or a string of 24 hex characters, its in mongodb and node
body: <p><a href="https://i.stack.imgur.com/DHi8J.png" rel="nofollow noreferrer">enter image description here</a>I am trying to do a get request for each blog when they are clicked but for some reason its not working am getting an error. Here is my code.</p>
  <pre><code>&lt;% blogs.forEach(blog =&gt; { %&gt;
    &lt;a href=&quot;/blogs/ &lt;%= blog._id %&gt; &quot;&gt;
    &lt;h3&gt; &lt;%= blog.title %&gt;  &lt;/h3&gt;
    &lt;p&gt; &lt;%= blog.snippet %&gt;  &lt;/p&gt;
    &lt;/a&gt;
  &lt;% }) %&gt;
  
  &lt;div class=&quot;details content&quot;&gt;
     &lt;h2&gt; &lt;%= blog.title %&gt;  &lt;/h2&gt;
  &lt;div class=&quot;content&quot;&gt;
     p&gt; &lt;%= blog.body %&gt;  &lt;/p&gt;
  &lt;/div&gt;
  &lt;/div&gt;
  
  app.get('/blogs/:id', (req,res) =&gt; {
  const id = req.params.id;
  Blog.findById(id)
  .then(result =&gt; {
  res.render(&quot;details&quot;, {blog: result});
  })
  .catch(err =&gt; {
  console.log(&quot;Error&quot;, err);
  })
  })
  </code></pre>