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

188
Vistas
How to catch value that caused exception

Is there any way to catch the value of what caused an exception to be thrown? I'm currently using a Nest global exception filter that catches just about everything (a very basic one, identical to the one on Nest's documentation) and to show custom messages, I'm doing something like:


catch(exception, host) {
if(exception instanceof AnyErrorObjectHere) {
 // log a custom message
}
}

What if I want to know what caused that issue? If I tried to send an invalid value to my ORM or if I tried to parse something not parsable... Do my exception holds that value?

about 4 years ago · Santiago Gelvez
1 Respuestas
Responde la pregunta

0

Have you tried this?:

exception?.message

https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Error/Error

about 4 years ago · Santiago Gelvez 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