If there’s an error, you should return immediately.
if (err) return console.log(err)
Make sure to convert the date to the right format. Use toDateString()
Data coming back from mongodb might be quite different from what you’re expecting. I use console.log to make sure I understand how the return data are formatted.
You’re returning all exercises when adding a new exercise. That is not correct. I made the same error. It is very easy to misread but in their description "The response returned will be the user object with the exercise fields added." The exercise fields is referring to description, duration, and date of a newly added exercise.
You return just the newly added exercise along with the user info.
It seemed that the Date format was incorrect. After hours of scouring the internet, I was able to find the FreeCodeCamp python test file against which my output was checked. Manipulating the date seemed to fix the problem. Thank you so much for your help!