To pass an error for an invalid url

Tell us what’s happening:

I am not able to pass the last test of this challenge,
it’s working perfectly my webpage, but still not able to pass it

Your code so far
My glitch link:https://glitch.com/edit/#!/url-shortapp

Your browser information:

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

Challenge: URL Shortener Microservice

Link to the challenge:
https://www.freecodecamp.org/learn/apis-and-microservices/apis-and-microservices-projects/url-shortener-microservicePreformatted text

It should return { error: 'invalid url' } when an invalid url is submitted and by invalid they mean malformed, so instead of something like “http://something.com” somebody tries to input something that is not a url, such as “a-dfafas-fa-sf-”.

But if you check my glitch link the same thing appears, then what’s the issue.
Did you completed your project? Did you got expected output?