title: Node mysql error is not being caught by Promise reject
body: <p>I'm making a simple database call wrapped in a promise, and trying to catch the error and pass it through to the promise reject(), but the reject isn't being handled or bubbled back up by the calling code. The code just stops executing when the mysql call fails.</p>
  
  <p>The error within the mysql callback is:</p>
  
  <blockquote>
    <p>REJECTING QUERY { Error: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near '?' at line 1</p>
  </blockquote>
  
  <p>Here is the database query code:</p>
  
  <pre><code>this.query = function(sql, params) {
      return new Promise((resolve, reject) =&gt; {
          _pool.query(sql, params, function(err, result) {
              if (err) {
                  console.log("REJECTING QUERY", err);
                  return reject(err);
              }
              resolve(result);
          });
      });
  }
  </code></pre>
  
  <p>Here is the calling code:</p>
  
  <pre><code>this.createUser = function(data) {
      var query = "INSERT into users SET ?";
  
      return new Promise((resolve, reject) =&gt; {
          Container.DB.query(query, data)
              .then((response) =&gt; {
                  console.log("Resolved", response);
                  return resolve(response);
              },(error) =&gt; {
                  console.log("REJECTION ERROR", error);
                  return reject('An unknown error occurred and has been reported.');
              })
              .catch((err) =&gt; {
                  console.log("CAUGHT ERROR", err);
              });
      });
  }
  </code></pre>
  
  <p>I get to "REJECTING QUERY" within the database query code, but nothing in the calling code is reached (ie. .then, or the error handler, or the .catch handler). 
  Is it possible to get the mysql error to reach these points in code so I can respond to the user? Am I doing something wrong?</p>