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

Default to standard error serializer for non-error middleware. #52

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

mastermatt
Copy link

The err serializer was not defaulting to the standard Error serializer provided by bunyan when there was no error instance.
In practice this means it won't be set for the logger created by the default middleware.

It seems common practice to log an error when processing a request then not let it bubble up to an error middleware. However, in that case the resulting log unexpectedly logs err: {}.

The `err` serializer was not defaulting to the standard Error serializer
provided by bunyan when there was no error instance.
In practice this means it won't be set for the logger created by the
default middleware.
It seems common practice to log an error when processing a request then
not let it bubble up to an error middleware. However, in that case the
resulting log unexpectedly logs `err: {}`.
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

Successfully merging this pull request may close these issues.

1 participant