When I search for user that does not exit in database I should get 404 error but it keeps getting 500. So why?

前端 未结 0 559
难免孤独
难免孤独 2020-12-31 03:20

I should get 404 error but it keeps getting 500. So why?

app.get(\'/users/:id\', (req, res) => {
  const _id = req.params.id

  User.findById(_id).then((us         


        
相关标签:
回答
  • 消灭零回复
提交回复
热议问题