User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/103.0.0.0 Safari/537.36
Challenge: Back End Development and APIs Projects - Exercise Tracker
Link to the challenge:
The Code is unable to pass the last test. I have checked the outputs and everything seems fine. Also checked the network tab and nothing seems wrong.
Can anyone help me ?
One issue is that when you specify the request query string parameter limit, the count value needs to be limit (when the limit is less than the count) or count (in case count is less than the limit or no limit is specified).
Not sure why it is timing out, if I fork it and use my own DB it passes.
Try using a VPN, or try using a different geographical location like the EU or US when creating the cluster.
Try it on Glitch.
@prasadsaya If I understand what you are saying then the test doesn’t check for that. I was thinking the same at first that the count property should change depending on the length of the log array.
The test only checks if it’s an array and its length.
Ok. It seemed like something is wrong with the test , because I ran the test on the console of that page and it seemed fine . I am unable to find what is going wrong with the tests.
Even tried a vpn. Doesnt solve it.
Did you create a new cluster? If not delete the collection on the DB or create a new cluster.
Edit: well if it fails with other people’s DB connections it can’t really be your DB I would think. But I guess it can be the connection to MongoDB Atlas.
At this point, I have no idea why it is failing for you. Check the network tab in the browser when submitting.
@ParadoxPD Post your network tab info in the post you can still edit.
One thing you might try, which is a little silly to have to do, is to filter the log array using only JS. So no mongoose queries just pure JS filtering.
I don’t know if it’s relevant to the issue here but I experienced a time zone offset with FCC servers that caused my tests to fail on this project; when I tried at a time when the date was the same in both time zones the tests passed (more information here).