[SOLVED] HELP REQUEST - Timestamp Microservice

My code is available here:

All tests pass bar one: “It should return the expected error message for an invalid date”.

Looking at the data that’s sent I get a correct response in the browser.


Can anyone help?

1 Like

This looks correct to me and nothing obvious is jumping out. I remixed it and tried to run it myself, getting the same failed test. Below is a console log I get (chrome) … which I don’t see rerunning my project.

I believe this is an issue with the test and not my code.

I have found the issue. The test is looking for a different response for invalid dates. The boilerplate project has a different user story from the curse-arrow project.

Point 5 in boilerplate has return {“unix” : null, “utc” : “Invalid Date” } but the curse-arrow has {“error”: “Invalid Date”}. The test is expecting the latter response. Once I fixed this it started passing.

Probably easiest for FCC to fix the user story on the boilerplate project.


Thank you so much for this!!! I was losing my mind!

broh! i didn’t get you. please can u explain to me in detail cux i am getting the same error.

here is my code…

check your spelling :slight_smile:
res.json({ error: "Invaid Date" });


Thank you so much!! :slightly_smiling_face: