title: Nodejs - MySQL Error Handling
body: <p>I would love some input on handling errors with the node-mysql library.  I am currently doing the following and it isn't anywhere close to bulletproof...</p>
  
  <pre><code>    exports.checkResults = function (error, result) {
      var count = 0;
      if (!error &amp;&amp; result !== undefined) count = Object.keys(result).length;
  }
  </code></pre>