forked from pinojs/pino-std-serializers
-
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Serialize errors with cause (pinojs#105)
* Add (failing) test for serialization of causes of errors * Add cause serialization to error serializer The error serializer already handles the case where an error is not of type Error (or AggregateError) well, so there is no reason to add special handling for that. We can simply pass whatever is in `cause` into the serializer, and we should get a serialized result out. * Add `cause` to errors in similar way to what is done in other errors * Expand cause serialization test to show recursion
- Loading branch information
1 parent
c40269b
commit ae83956
Showing
2 changed files
with
33 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters