Back End Development and APIs Projects - Timestamp Microservice

Tell us what’s happening:

My Apis run well locally and in gitpod. I get the anticipated responses. But then when running tests I get this error:
TypeError: Cannot read properties of undefined (reading ‘error’) at Object.eval (eval at (https://www.freecodecamp.org/js/frame-runner-c57487bf5fd2abe07279.js:2:123903)

###Your project link(s)

solution: https://freecodecam-boilerplate-1c5d1ioefte.ws-us117.gitpod.io

githubLink: GitHub - Dan-EM/Free-Code-Camp-Timestamp-Microservice

Your browser information:

User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/131.0.0.0 Safari/537.36

Challenge Information:

Back End Development and APIs Projects - Timestamp Microservice

You have an isInvalid function, where is it declared?

If it is missing in the repo code, please update it.

Thank you for getting back to me! I have added the isInvalid function to my GitHub project.

Your code is passing for me. Where are you running it, locally or on Gitpod?


The error you posted would suggest the test isn’t finding the invalid date error response. Not sure how or why that would happen. The time being wrong could happen for various reasons, but I don’t see how the error response would fail.

Open the browser network tab and submit. Now look at the response for the this-is-not-a-date request. What is the response?

Both pass for me, but when I hit “I’ve completed this challenge”, it seems that the tests themselves fail.

Furthermore, this-is-not-a-date seems to throw “401 Unauthorized”

What is the URL you are submitting?

The Gitpod URL should be the one with the port number. Your code is passing for me.

https://3000-freecodecam-boilerplate-1c5d1ioefte.ws-us117.gitpod.io/

1 Like

Thank you, I was submitting:
https://freecodecam-boilerplate-1c5d1ioefte.ws-us117.gitpod.io/

That works for me! Thank you so much!