Tim-B / grunt-aws-lambda

A grunt plugin to assist in developing functions for AWS Lambda.
MIT License
247 stars 100 forks source link

Invoke error messages: returned callback(new Error('some message')) always printing {} #108

Open nealshail opened 7 years ago

nealshail commented 7 years ago

By default JSON.stringify(new Error(‘some error message’)) will always print {}. In order to get a comprehensive error message we need to specifiy which properties of the error message to print out.

see this article for more details https://stackoverflow.com/questions/18391212/is-it-not-possible-to-stringify-an-error-using-json-stringify