I have an Next.js API endpoint I\'m calling to insert a document into a Mongo collection.
The insertion works fine, but when I hit the api, it returns a 500 error even th