I’m running into the following error when trying to update a User document:
index.ts:32 Uncaught (in promise) Error: reason="role \"default\" in \"maintenance-tracker.User\" does not have update permission for document with _id: 6286bc0194c80f7c64c60124: could not validate document: \n\t_id: Invalid type. Expected: type: undefined, bsonType: objectId, given: [string mixed]"; code="SchemaValidationFailedWrite"; untrusted="update not permitted"; details=map[]
I’m not sure what this means. I do not have trouble updating any other documents. Why would updating this document lead to issues? Does anyone have any tips on figure out what is going on? I’m quite new to this so I’d appreciate some guidance.
The difference between the User documents and other documents is that I create User documents using a function which is triggered whenever a new user signs up.