The 4th test keeps on failing on the FCC excercise tracker

Tell us what’s happening:
The 4th test keeps on failing and I have no clue why. When I check my db collection it fails to save exercises. But when I manually input data to the form all is well. This is hard to debug because I am not getting any useful information when the FCC_test_fails.

Your project link(s)

solution: https://replit.com/@neomashego/boilerplate-project-exercisetracker-1

Your browser information:

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

Challenge: Exercise Tracker

Link to the challenge:

1 Like

Welcome there,

If you look at the route and where the id is:

app.post('/api/users/:_id/exercises

Then, look at how you are getting the id:

const _id = new ObjectID(req.body[':_id'])

Also, here is a slightly more useful way i get info from the tests (devtools):

Hope this helps

Thanks i figured it out.

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