Exercise Tracker - Object literal problem

Tell us what’s happening:
I can’t get passed in test where it says “Each element in the array returned from GET /api/users is an object literal containing a user’s username and _id.”

every other test is passed. this is becoming very unclear to me now.
I already tried console logging the array result and everything is there. Somebody please.help. Thanks


Your browser information:

User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/113.0.0.0 Safari/537.36

Challenge: Back End Development and APIs Projects - Exercise Tracker

Link to the challenge:

The test expects the _id to be of type String.

I would suggest you use the default id provided to you by MongoDB/Mongoose, no reason to use a single-digit incrementing number when you can get a unique id out of the box without having to do anything.

1 Like

Thank you. I had this resolved earlier.!

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