mern_stack_course
mern_stack_course copied to clipboard
ValidationError: Note validation failed: user: Cast to ObjectId failed for value because of "BSONError"
Cannot make a newnote because of this error
ValidationError: Note validation failed: user: Cast to ObjectId failed for value "Havoc" (type string) at path "user" because of "BSONError"
here a user named 'Havoc' is trying to make a new note.
something to note:
my database uri is different where i dont' have the database name like 'techNotesDB' as in the case of the video
Issue: ValidationError: Note validation failed: user: Cast to ObjectId failed for value "Havoc" (type string) at path "user" because of "BSONError.
Solution: Not to use a name rather have to use a user ID.