I have read several posts regarding this error but I can't seem to diagnose mine. I am getting a cyclic dependency detected
with MongoDB when I use curl to send a JSON file POST request:
{"statusCode":500,"error":"Internal Server Error","message":"cyclic dependency detected"}%
with no other error message.
My post route is as such:
fastify.post('/newFile', function (req, reply) {
const movies = this.mongo.db.collection('Movies')
movies.insertOne({ req }, (err, user) => {
if (err) {
reply.send(err)
return
}
reply.send(user)
})
})
I don't see any immediate cyclical call here...?