Back End Development and APIs Projects - URL Shortener Microservice I am not passing any test

Tell us what’s happening:
I am only passing the first test, which is kinda obvious.
My code does everything exactly as expected, but still, I am not passing the test, I don’t know why.
I am saving the URLs in an Array, the redirect works fine, the post works fine it outputs the JSON as expected, still not passing the tests :exploding_head:

solution: boilerplate-project-urlshortener - Replit

Your browser information:

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

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

Link to the challenge:

I see this all the time it wont function with the replit, if you could some how run the code in a IDE like VScode , the results might be different, I ran and checked all your code and its fine CSS Javascript and Html. but there server throws theses Uncaught Errors ETC…

You are not doing the URL validation correctly. Open the network tab in the browser dev tools and look at the request/response when you submit.

  1. dns.lookup takes a hostname, it should not have path.
new URL('').hostname
  1. Your error message has a typo.

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