title: nodejs - JSON.stringify Error object
body: <p>I'm trying to convert <code>Error object</code> to JSON. However, the <code>Error message</code> seems to be lost.</p>
  
  <pre><code>try{
      require('someModule');
  }catch(error){
      console.log(JSON.stringify(error)) //{"code":"MODULE_NOT_FOUND"}
  }
  </code></pre>
  
  <p>Did I do anything wrong? How can I fix it?</p>