Cannot pass Timestamp Microservice test, even though it does

Tell us what’s happening:
My Code passes all the test except

" Your project can handle dates that can be successfully parsed by new Date(date_string) "

However, my code clearly does this anyway. I’ve tried other users’ code and multiple different solutions but still no success. What am I missing?

Your code so far

app.get("/api/timestamp", (req, res) => {
  let now = new Date();
    unix: now.getTime(),
    utc: now.toUTCString(),

app.get("/api/timestamp/:date_string", (req, res) => {
  let date_string = req.params.date_string;
  let passedInValue = new Date(date_string);

  if (parseInt(date_string) > 10000) {
    let unixTime = new Date(parseInt(date_string));
      unix: unixTime.getTime(),
      utc: unixTime.toUTCString(),

  if (passedInValue == "Invalid Date") {
    res.json({ error: "Invalid Date" });
  } else {
      unix: passedInValue.valueOf(),
      utc: passedInValue.toUTCString(),

Your browser information:

User Agent is: Mozilla/5.0 (Macintosh; Intel Mac OS X 11_0_1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/87.0.4280.88 Safari/537.36.

Challenge: Timestamp Microservice

Link to the challenge:

Do you have a link to your full project code?

What happens if you call /api/timestamp/05 October 2011?

It would appear the code you have posted would pass the tests, but would need to see how you have incorporated the code above into your overall project code to know for sure.

Lastly, what is the url you are submitting for the project? You may not be using the correct one.