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

337
Views
How to get "Failed to fetch" reason?

Some of my users are encountering a "Failed to fetch" issue on certain fetch requests. I'm trying to figure out why. It's fetching from the same domain, so it shouldn't be a CORS issue.

Is there any way I can get more info? e.g. in Chrome, when I intentionally block the URL, it tells me blocked:devtools. Can I get similar info out of the error object in a .catch block? e.g. bad headers, CORS rejection, lost internet, whatever?

To be clear, I want to get this info programmatically. My users are experiencing this issue, not me. I'll send the data to my error catcher to debug further.

enter image description here


PerformanceObserver does not seem to report on requests that have failed:

(async () => {
    const o = new PerformanceObserver((list, observer) => {
        console.log('observation!')
        console.log(list.getEntries())
    })
    o.observe({entryTypes:['resource']})
    fetch('/fail').then(console.info,console.error)
    o.disconnect()
})()
about 4 years ago · Juan Pablo Isaza
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!