Code is working but the tests are timing out and thus not passing

In the url shortening microservice project, the code I am trying to submit works well for me but the tests timing out. This is what’s popping up -
You can POST a URL to /api/shorturl and get a JSON response with original_url and short_urlproperties. Here’s an example:{ original_url : 'https://freeCodeCamp.org', short_url : 1}(Test timed out) When you visit/api/shorturl/<short_url>, you will be redirected to the original URL. (Test timed out)

Project link(s)
solution: boilerplate-project-urlshortener (1) - Replit

Browser information:

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

Challenge: Back End Development and APIs Projects - URL Shortener Microservice

Link to the challenge:

im not getting “timed out” error, seems like you have solved it maybe?!

They’re still timing out for me… test 2 and 3.

Sorry for the late reply btw

did you try to troubleshoot this? if so, what have you tried, also share code snippet where possible, thanks :slight_smile:

@ RandellDawson That’s because I was tinkering with the code recently and might have removed it in the process. Sorry to misdirect you…I should have copied the code and tinkered with the copy instead.

I think there was a problem with Replit or my system or with the internet, idk, because the tests are passing now even though the code is still exactly the same as the one I originally wrote.

And I promise I had the res.json() in my original code too.

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.