title: Exception in AWS lambda function is empty
body: <p>I'm trying to serialize an exception in an AWS lambda function, but when I do it, the object has no properties. Here is a simplified version of this:</p>
  
  <pre><code>exports.handler = function(event, context) {
    try {
      var x = some.property;
      context.succeed(null);
    } catch (err) {
      console.log("error=" + JSON.stringify(err, null, 2));
      context.fail(err);
    }
  };
  </code></pre>
  
  <p>Here's the log output. Note that when I <code>JSON.stringify</code> the exception object, there's nothing there, but in the <code>context.fail</code> line, the exception data is there.</p>
  
  <pre><code>START RequestId: 810913d1-567b-11e5-a0d1-95dad6b9184b
  2015-09-08T22:46:55.308Z    810913d1-567b-11e5-a0d1-95dad6b9184b    error={}
  2015-09-08T22:46:55.368Z    810913d1-567b-11e5-a0d1-95dad6b9184b    {"errorMessage":"some is not defined","errorType":"ReferenceError","stackTrace":["exports.handler (/var/task/index.js:5:17)"]}
  END RequestId: 810913d1-567b-11e5-a0d1-95dad6b9184b
  REPORT RequestId: 810913d1-567b-11e5-a0d1-95dad6b9184b  Duration: 174.72 ms Billed Duration: 200 ms     Memory Size: 128 MB Max Memory Used: 9 MB   
  </code></pre>
  
  <p>Anyone know what might be happening?</p>