Think I found a possible bug or might need some explaination. Discovering Open-Source Middleware

https://www.codecademy.com/paths/web-development/tracks/javascript-back-end-development/modules/learn-express-middleware/lessons/middleware/exercises/discovering-open-source-middleware

I looked at the answer on the exercise above and while I see it added the following lines to the code base.

const errorHandler = require('errorhandler')
app.use(errorHandler());

I still see

app.use((err, req, res, next) => {
  res.status(500).send(err);
});

at the bottom of the file. I would have expected the following line to replace the line directly above.

app.use(errorHandler());

Hey @alangervin3193293788, you are right about this… It is a bug, you can report it by using the ‘Get Help’ Button in the bottom right corner of your screen.

You’re the man hypercoder 457.

Thanks @alangervin3193293788 :slightly_smiling_face: :slightly_smiling_face: :slightly_smiling_face: :slightly_smiling_face: :slightly_smiling_face: