I have a mysql statement that creates an entry, it has a .then
function and a .catch
function, but when the following error occurs:
T
Well,
I'm guessing that you are using the standard mysql package which it seems not supporting Promises, instead, it accepts a standard node callback function(err, results, fields) {}
as an argument of the execute method.
So since you haven't defined a valid callback the script will just throw an exception.