trentm/node-bunyan

Handle non-function `cause` field in error serializer

yelworc opened this issue · 2 comments

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).