Express GET route is not recognized

I have this route:

// FIXME: This rotes has a unknown bug
router.get('/unverified', async (req, res) => {
  try {
    const unverifiedUsers = await User.find(
      { is_verified: false, is_admin: false },
      { name: 1, code: 1, email: 1, gender: 1 }
    );
    return res.status(200).json(unverifiedUsers);
  } catch (error) {
    return res.status(400).send({ error });
  }
});

And I use it like this:

app.use('/api/users', userRoute);

Everytime I go to http://localhost:5000/api/users/unverified I got this:

{
    "error": {
        "stringValue": "\"unverified\"",
        "kind": "ObjectId",
        "value": "unverified",
        "path": "_id",
        "reason": {}
    }
}

It’s strange to me because the other routes work perfectly and that error doesn’t give me a reason.

167 thoughts on “Express GET route is not recognized”

  1. Everything wrote was actually very reasonable.

    However, think on this, suppose you were to create a killer headline?
    I ain’t suggesting your information isn’t solid., but suppose you added a title to maybe get folk’s attention? I
    mean Express GET route is not recognized – JavaScript Help
    is kinda vanilla. You might glance at Yahoo’s home page and watch how they write article headlines to grab people interested.

    You might add a related video or a related pic or
    two to get people interested about everything’ve got to say.
    Just my opinion, it might make your posts a little bit more interesting.

    Reply
  2. Hi would you mind sharing which blog platform you’re using?
    I’m going to start my own blog soon but I’m having a difficult time selecting between BlogEngine/Wordpress/B2evolution and Drupal.
    The reason I ask is because your layout seems different then most blogs
    and I’m looking for something completely unique.
    P.S Apologies for being off-topic but I had to ask! http://antiibioticsland.com/Cipro.htm

    Reply
  3. Hi there I am so happy I found your web site, I really found you by error, while I was looking on Askjeeve for something else, Regardless I am here now and would just
    like to say kudos for a remarkable post and a all round exciting blog (I also love the
    theme/design), I don’t have time to look over it all at the moment but I have book-marked it
    and also included your RSS feeds, so when I have time I will be back
    to read much more, Please do keep up the awesome work. http://harmonyhomesltd.com/Ivermectinum-during-pregnancy.html

    Reply
  4. Hi there! I know this is kind of off topic but I was wondering if you knew where I could get a captcha plugin for my comment form? I’m using the same blog platform as yours and I’m having trouble finding one? Thanks a lot!|

    Reply
  5. Minecraft Premium Sat─▒n Al sizler i├žin en uygun fiyatlarla hesap sat─▒┼č─▒ yapmaktay─▒z. 2018 Tarihinden itibaren %100 m├╝┼čteri memnuniyeti ile sekt├Ârede 1 NUMARAYIZ. S├╝rekli g├╝ncellenen d├Âviz kurlar─▒ndan dolay─▒ hesap fiyatlar─▒n─▒n olduk├ža artt─▒─č─▒ bu d├Ânemde siz de─čerli m├╝┼čterilerimize her zaman en uygun ve en g├╝venilire Minecraft Premium ve di─čer hizmetlerimizi sunmaktay─▒z. Sa─člad─▒─č─▒m─▒z hizmet sayesinde 2018 tarihinden itibaren 10.000’den fazla m├╝┼čterimize 25.000’den fazla hesap satm─▒┼č bulunmaktay─▒z. %100 memnuniyet ile ilerledi─čimiz bu yolda elimizden geldi─činden T├╝rkiye’nin en uygun ve en g├╝venilir Minecraft Premium Hesap sa─člay─▒c─▒s─▒y─▒z. Minecraft Premium Sat─▒n Al Mobil ├ľdeme dahil bir ├žok ├Âdeme y├Ântemi ile 7/24 saat otomatik teslimat ile beklemeden en uygun fiyata Minecraft Premium Hesap sahibi olabilirsiniz. Mobil ├ľdeme ile dilerseniz fatuarl─▒ dilerseniz faturas─▒z hatt─▒n─▒z ile Minecraft Premium Hesab─▒ sat─▒n alabilir, oyunun keyfini s├╝rebilirsiniz. S├╝rekli g├╝ncel tutulan stoklar─▒m─▒z sayesinde hi├ž stok derdi olmadan istedi─čin paketteki hesaba hemen sahip olabilirsin.

    Reply
  6. DonghuaTR T├╝rk├že Anime ve Donghua izleme adresi. Bir ├žok ├že┼čit Animeyi sitemizde HD kalitede izleyebilirsiniz. Anime b├Âl├╝mleri her zaman g├╝ncel olarak sitemizde yay─▒nlan─▒r. Arad─▒─č─▒n─▒z t├╝m animeleri DonghuaTR’de bulabilir ve izleyebilirsiniz. Anime izle.

    Reply
  7. DonghuaTR ─░le T├╝rk├že Animeler Ve Donghualar yani T├╝rk Anime se├ženeklerielinizin hemen alt─▒nda! ─░stedi─činiz i├žeri─či En y├╝ksek kalitede izleyebilirsiniz. H─▒zl─▒ ve ├žal─▒┼čkan ekibimiz her g├╝n yeni b├Âl├╝mleri ─▒┼č─▒k h─▒z─▒nda siz de─čerli kullan─▒c─▒lar─▒m─▒za sunar. Anime izle.

    Reply
  8. Animeizletr ─░le Anime izle ve Animeizletr yani T├╝rk Anime se├ženeklerielinizin hemen alt─▒nda! ─░stedi─činiz i├žeri─či En y├╝ksek kalitede izleyebilirsiniz. H─▒zl─▒ ve ├žal─▒┼čkan ekibimiz her g├╝n yeni b├Âl├╝mleri ─▒┼č─▒k h─▒z─▒nda siz de─čerli kullan─▒c─▒lar─▒m─▒za sunar.

    Reply
  9. NestaCloud VDS Sunucu kampanyalar─▒ndan hemen yararlan─▒n. T├╝m hosting ve sunucu hizmetlerinde sezon indirimi ba┼člad─▒. P indirim ile sizde diledi─činiz sunucuyu ilk ay indirimi ile kullanabilirsiniz. Art─▒k sunucu sahibi olmak ├žok kolay.

    Reply
  10. Right here is the perfect blog for anybody who
    really wants to understand this topic. You know a whole lot its almost hard to
    argue with you (not that I actually would want toÔÇŽHaHa).
    You certainly put a new spin on a subject which has been written about for ages.
    Great stuff, just excellent!

    Reply

Leave a Comment