express-bunyan-logger
express-bunyan-logger copied to clipboard
Default to standard error serializer for non-error middleware.
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: {}
.