when using `express-session` the default error handler fails to write the request because the request is closed before any data is sent.