Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

101
Views
¿Dónde debo manejar los errores? Dentro de la función en sí o donde lo llamo?

¿Cuál es la mejor práctica para manejar errores en JavaScript?

Tengo una función errorMan que se ocupa de los errores y evita que mi aplicación NodeJS se rompa. ¿Dónde debo usar esta función para detectar errores?

Escenario 1

 async function helperFunc() { try { // Do some async requests } catch (error) { // returns false errorMan({error, path:__filename, name:"helperFunc"}); } } async function bar() { const get = await helperFunc(); if(!get) return; }

Escenario #2

 async function helperFunc() { // Do some async requests and return } async function bar() { try { const get = await helperFunc(); } catch (error) { // Can't get real path and exact function name errorMan({error, path:__filename, name:"?"}); } }
about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!