JS tente pegar err.printstacktrace

try{
  //some error
} catch (err){
  console.log(err.stack);
}

Busy Boar