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

138
Vistas
Skip unreachable URLs in Axios fetch call

I call a range of IPs with axios to get some jsons. Some IPs are not reachable and this is expected. How can I skip those and continue with showOutput(responding_IPs)?

ip_range = [ "10.0.0.1", "10.0.0.2", "10.0.0.3" ]; // hard-coded as example
let promiseArray = ip_range.map(url => axios.get('http://' + url + '/settings'));
axios.all(promiseArray)
.then(res => showOutput(res, ip_range))
.catch(err => console.error("Error: At least one IP is not reachable"));

If there needs to be a timer, 2 seconds would be enough.

btw I want to switch from then to await in the next step.

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