Back End Development and APIs Projects - URL Shortener Microservice

Tell us what’s happening:
I have implemented the URL shortener micro-service and everything is working fine according to the user stories. Still, the invalid URL test case always fails, even though I’m getting the correct results. Can anyone suggest some changes to pass the invalid URL test case?

Your project link(s)

solution: fcc-url-shortener-microservice - Replit

Your browser information:

User Agent is: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/104.0.5112.81 Safari/537.36

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

Link to the challenge:

401 would not be the correct status code to send for the invalid URL anyway.

But I’m not so sure the test should expect an OK response for the invalid URL. It doesn’t seem unreasonable to send back a 400 (or 422).

Thanks for the info. It worked when I changed the status code to 200 for error ‘invalid url’.

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