Exercise Tracker Project Failing (Test timed out)

I’m working on this project: https://www.freecodecamp.org/learn/back-end-development-and-apis/back-end-development-and-apis-projects/exercise-tracker

Even though as far as I can tell my code is producing the desired results, I’m still failing the last several tests.

After the first failure in #8 (The response returned from POST /api/users/:_id/exercises will be the user object with the exercise fields added) the rest of the failures all have a (Test timed out) note added, which I’m not sure what that means.

Link to code: https://replit.com/@sssmsm/boilerplate-project-exercisetracker#server.js

Any and all assistance is greatly appreciated!

2 Likes

I’m not sure anyone else will have this issue, but just in case, I found the issue.

I didn’t declare the “userid” field in the Exercise schema when I first created it, so ALL Exercises were being searched when using find() on it, rather than just the one that matched up with the id of the user (because the “userid” field didn’t exist).

Now it passes!

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