Returns a JSON representation of an error (handles nested errors and calls nested toJSONs)
github.com/tjmehta/error-to-json
tjmehta/error-to-json