I can’t find where I’m getting wrong
I was completing my Exercise Tracker project and I thought I did everything correctly. I tested and I get the expected outputs, but I can’t pass FCC test.
Can someone point out where I’m getting wrong?
Link to my project:
Your browser information:
User Agent is:
Mozilla/5.0 (X11; CrOS x86_64 13982.88.0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/92.0.4515.162 Safari/537.36
Challenge: Exercise Tracker
Link to the challenge:
Just look at your console on repl.it after you run the fCC tests. I’m getting a bunch of
unhandled promise rejection errors from your
findAndFilterInfo, so I would start debugging there. Those errors are tricky. When I log from your
/api/users/:id/exercises route, the response is always undefined from
findAndUpdateUser, which is why the tests for that route are failing.
You’re going to have to go through all the functions for that route (and all the routes preferably) and log the input and responses to understand what they are currently doing so that you can make them do what they should be doing.
Yes, when I do it manually it works. But I put some console.logs along the way to figure out and there’s some problems when I try to convert the date.
Any way, thanks for your reply!!
I will try to make some tweaks to figure it out!
So, I discovered some of the problems.
In the pipeline of
findAndFilterInfo, I made some mistakes in my conditions that were allowing
toDate to pass.
The other error is when the user has no
log. Should return an object with
log as an empty array, but at the moment does return nothing. I’m trying to look how to fix that.
I just wanted to leave the info, in case someone else get stuck on the same problem.
This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.