Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

169
Views
Why do i get FailedToParse while i run my server on mongodb atlas database?

When I run my server from localhost database , I get the results that I want. But whenever i run my server from mongoDb atlas, i get an error that says "FailedToParse" .

My api code is `

const id = req.params.userId
const conversations = await Conversation.aggregate([
  { $match : { members : id } },
  {
    $lookup:
    {
      from : "messages",
      localField : "_id",
      foreignField : "conversationId",
      as: "last_message",
               "pipeline": 
        [  
            { "$sort": { "_id": -1 } },
            { "$limit": 1 }
        ]
      }
  },
  { "$addFields": {
      "last_message": { "$arrayElemAt": [ "$last_message", 0 ] }
    }
  }
]);

console.log('conversations', conversations);

res.status(200).send(conversations) `

And I got this result `

"operationTime": "7029823666309300225",

"ok": 0,
"code": 9,
"codeName": "FailedToParse",
"$clusterTime": {
    "clusterTime": "7029823666309300225",
    "signature": {
        "hash": "6PEpXcdz8JQSej0XlAF+hIJ/g1Q=",
        "keyId": "6975126282837164033"
    }
},
"name": "MongoError"

`

about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!