0

I need to insert a log error in my db with the error.

mysql.query(sql_log, [sucess], function (err, result) {
     if (err){ 
        mysql.rollback(function() {
           throw err;
        });
      }
});

I need get err.message

Leandro Matilla
  • 911
  • 4
  • 14

1 Answers1

0

just console.log(err); after if condition.

mysql.query(sql_log, [sucess], function (err, result) {
 if (err){ 
console.log(err);
    mysql.rollback(function() {
       throw err;
    });
  }});
Abhi Anand
  • 21
  • 1
  • 7