Stuck on one last thing in Beau's MERN stack Course - Youtube

Hi all,

I finished this youtube course (beside the serverless Realm stuff):

My app is working except for one bug - my backend throws an error when trying to update a restaurant review from the front end:

BSONTypeError: Argument passed in must be a string of 12 bytes or a string of 24 hex characters or an integer

I’ve been trying to figure this out all day. I’m passing in the data for the updateOne method with the same data types used when I create a new review, which works fine.

Also when I update a review using postman it works fine, I can see the update on the document in Atlas. It’s only when I try to submit the update from the front end it throws this error

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.