title: get method in Express-mongodb " Argument passed in must be a single String of 12 bytes or a string of 24 hex characters"
body: <p>I'm currently working in an api with mongodb-nodejs-express implementing a get method that finds all stores in my database using its id, the problem is I keep receiving the following error when I use the get method:</p>
  
  <pre><code>"error": "Error: Argument passed in must be a single String of 12 bytes or a string of 24 hex characters"
  </code></pre>
  
  <p>This is the link I'm using to prove</p>
  
  <pre><code>http://localhost:4005/trading/store/1124
  </code></pre>
  
  <p>This is the method I've implemmented</p>
  
  <pre><code>router.get('/store/:id', async (req, res) =&gt; {
      const { id } = req.params;
      const db = await connect();
      try{
      const result = await db.collection(collection).find({ store_id: ObjectID(id)});
      res.json(result)
      }
      catch (error) {
          res.status(500).json({ error: error.toString() });
      }
  })
  </code></pre>
  
  <p>This is an example of how my db looks</p>
  
  <pre><code>{
          "_id": "5cef828a7443855d02fc320e",
          "timestamp": "26/03/2019 18:34",
          "store_id": "1124",
          "user_id": "123",
          "product_id": "949",
          "price": "528"
      },
  </code></pre>
  
  <p>I would really appreciate any hint or help and thanks in advance for taking the time to read my question.</p>