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

205
Vistas
How to check if nodejs process failed due to a timeout?

I spawn a synchronous process like this:

child = spawnSync('somecommand', { stdio: 'inherit', cwd: someDir, timeout: 30000});

Is there a reliable way to check if the child process failed due to the timeout option or some other error?

about 4 years ago · Juan Pablo Isaza
2 Respuestas
Responde la pregunta

0

If anyone runs into the same problem, there is a simple way to retrieve the timeout error code at run-time:

 if (child.error && child.error.code === "ETIMEDOUT") {
   console.log("child timed out");
 }
about 4 years ago · Juan Pablo Isaza Denunciar

0

You should check for the log of node which is running down there somewhere. You must be running this with a cli so you can see the log there. Or you can look for where the log is saved. Everything, specially the errors are noted there.

about 4 years ago · Juan Pablo Isaza Denunciar
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