URL Shortner Microservice project fcc 2021

Hello Freecodecamp community!

Currently working on the URL Shortner Microservice project. I got 3 of the 4 tests to pass.

How do i get the final test to pass?

“If you pass an invalid URL that doesn’t follow the valid http://www.example.com format, the JSON response will contain { error: ‘invalid url’ }”

My code is here Glitch :・゚✧

Thank you. I appreciate the feedback.

I dont know what am I doing wrong when the code works fine both on dev & prod, here’s the link https://fccshortenurl.herokuapp.com/ , connected to MongoDB and hosted to Heroku.
Only first test passes, rest 3 are failed.

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