Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

336
Vistas
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
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda