pino-std-serializers
pino-std-serializers copied to clipboard
feat: Support serializing primitives within Error causes (#158)
Allow primitives to be returned as error causes when passed via the ErrorOptions object in an Error object constructor.
An alternative that I looked into some years ago was to align with what Node.js itself does when it serializes: https://github.com/voxpelli/pony-cause/pull/23
Would be kind of nice to fix this "upstream" in pony-cause as well
ping @jsumners
This PR not merged into master?
@lake2 you can clearly see that it is not. Please read the comments of the review process. I pointed out that this PR does not actually serialize all non-Error objects into useful representations. Nothing has been to address that feedback. You are welcome to pick up the work if you like.
Nothing has been to address that feedback.
To be fair, how I read the interaction was that there wasn't really much support from this project for logging non errors and the points made here were left unanswered.
From my point of view err.js is too opinionated and too simplified to be used with complex objects, but since its bundled with the library it feels like that ship has already sailed. It's understandable not to want to radically change the core output from a widely used library.
@lake2 - as @jsumners states, please feel free to pick up the work.