title: Error and data callback parameters in Node.js
body: <p>It seems to me a good and widely used practice to build callback routines in Node.js according to the following pattern.</p>
  
  <blockquote>
    <p>callback (error, data)</p>
  </blockquote>
  
  <p>The following experience I have done so far.</p>
  
  <ul>
  <li>In case of a successful execution, <em>error</em> is <code>null</code> or <code>undefined</code> and data contains the desired information.  </li>
  <li>In case of an erroneous execution, there are two possibilities.
  
  <ul>
  <li><em>error</em> contains an object with error infomation and <em>data</em> is <code>null</code> or <code>undefined</code></li>
  <li><em>error</em> contains a string with the name of the error and data contains optionally additional error information.</li>
  </ul></li>
  </ul>
  
  <p>The first variant appears to me more meaningful, since the parameters do not change their semantic independently of the execution result.</p>
  
  <p>And therefore my actual question.</p>
  
  <p>Is there an accepted standard or guideline that describes the structure of callback routines in Node.js and gives you an idea of how this should be, or even have to be?</p>