My URL Shortener Microservice didn't pass the test?

Hi,

I’m trying to submit URL Shortener Microservice challenge, and get this failed test:

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’ }

As I watched the logs in my application and test the submitted URL, I got this response:

{
"error": "invalid url"
}

Shouldn’t that pass the test? Please help.

Are you solving it on replit? Could you link to your code?

I used GitHub for repo, and deployed the solution on Heroku:
https://quaos-fcc-api-shorturl.herokuapp.com/

I think for simplicity just do either of the two, clone the github repo,or use the replit starter project

  • Clonto complete these challenges.

Completed this challenge after discussing with support.
The API needs to return 200 OK status code with error message.

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