node-bunyan
node-bunyan copied to clipboard
Handle non-function `cause` field in error serializer
Current versions of Node.js/V8 formally added the cause
property as an "official" error field, but are suggesting to store the source error object in it (as opposed to a function, as expected by Bunyan).
Bunyan should probably handle error-type cause
properties accordingly in its default error serializer (it can still accept functions as before, of course, for the sake of backwards compatibility).
This would be fixed by #665
It's also implemented in https://github.com/trentm/node-bunyan/pull/200