Tell us what’s happening:
Can’t pass the final test although response is shown. JSON response { error: ‘Invalid URL’} is shown and same as the example.
Yeh. I have tried both, { error: ‘invalid url’ } which is written as a requirement in test (by literally copying and pasting it ), and { error: ‘Invalid URL’ } which is shown in the example.
The problem seems to be that FCC uses ‘ftp:/john-doe.org’ which is supposed to be invalid. Yet, the new URL() function treats it as a valid url and passes it to the dns.lookup() function which checks just the hostname. The new URL() function is probably the culprit.