express-bunyan-logger icon indicating copy to clipboard operation
express-bunyan-logger copied to clipboard

Default to standard error serializer for non-error middleware.

Open mastermatt opened this issue 6 years ago • 0 comments

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: {}.

mastermatt avatar May 02 '18 22:05 mastermatt