Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

403
Views
Why does fetch in javascript return net::ERR_FAILED in every case?

I'm trying to ask an API with the fetch command:

    fetch('http://fr1.api.radio-browser.info/json/tags');

and chrome keep answer me :

net::ERR_FAILED

TypeError: Failed to fetch

I don't understand what's wrong with this simple code. Can anyone help me ?

Thanks

about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

If you catch the error after calling fetch, you should see a more descriptive error:

// HTTP
fetch('http://fr1.api.radio-browser.info/json/tags')
    .catch(console.error);

Mixed Content: The page at 'https://fr1.api.radio-browser.info/json/tags' was loaded over HTTPS, but requested an insecure resource 'http://fr1.api.radio-browser.info/json/tags'. This request has been blocked; the content must be served over HTTPS.

Try fetching using https:

// HTTPS
fetch('https://fr1.api.radio-browser.info/json/tags')
    .then(res => res.json())
    .then(console.log)
    .catch(console.error);
about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!