These are chat archives for Automattic/mongoose

May 2017
Karol Wójcik
May 07 2017 15:27

Hello guys supposing i got following code

getOneById(req, res, next) {
  const id =;

    .then((article) => {
      handleNotFound(article, 'Article is not found');
    .catch(err => next(err));

Do I need catch statement here? I mean when mongoose throws error?

May 07 2017 15:29 I have multiple users and a user can have multiple entries. How would you model this? A users collection and an entries collection and then the user has an entries array with ObectID's from the entries collection?