Back End Development and APIs Projects - URL Shortener Microservice

Tell us what’s happening:
My project currently passes the first and last tests. It doesn’t pas the 2nd and Third. And when I tried manually, everything worked just the way it was supposed to. I’d appreciate your help

Your project link(s)

solution: https://fcc-url-shortener-microservice-xi.vercel.app

githubLink: GitHub - codeHokage1/fcc_urlShortener_microservice

Your browser information:

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

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

Link to the challenge:

Try submitting the valid url https://freecodecamp.org/news to your app.

Thank you!
I worked on this, wrote an entirely new logic and it passes all tests now, except for the last one. :sweat_smile:
Once again, trying it manually, it worked just fine: an invalid url sent the response that the url is invalid. But I still dont understand why it is not passing the last test