Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Handle non-function cause field in error serializer #711

Open
yelworc opened this issue Jul 24, 2023 · 2 comments
Open

Handle non-function cause field in error serializer #711

yelworc opened this issue Jul 24, 2023 · 2 comments

Comments

@yelworc
Copy link

yelworc commented Jul 24, 2023

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

@rpaterson
Copy link

The cause property is a JS standard:

@rpaterson
Copy link

This would be fixed by #665

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants