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

129
Vistas
App was killed with setTimeout callback func on express.js

I have short question.

router.get('/', function(req, res, next) {
  throw new Error('123')
  res.send('respond with a resource');
});

When I call this snippet on express project. It throw error what I expected.

But

router.get('/', function(req, res, next) {
  setTimeout(() => {
    throw new Error('123')
  }, 1000)
  res.send('respond with a resource');
});

With this code express process killed with Command failed with exit code 1. this message.

What keywords should I study is? What am I missing?

Thank you.

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

0

1.The default error handler http://expressjs.com/en/guide/error-handling.html

2.callback error handler try/catch issues with nested functons in javascript

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