express: Default responder should not console.error 4xx errors

Right now the default handler (last step) will console.error when it gets an err, otherwise 404. I think that it probably shouldn’t console.error when the err it got was a 4xx error, mainly because a 4xx is supposed to be a client error, of which the server admin probably cannot do anything about. Adding a custom error handler could, of course, let the user log 4xx error all they wanted–this is just about the default behavior. It could probably wait until express 5, though.

About this issue

  • Original URL
  • State: open
  • Created 10 years ago
  • Comments: 17 (17 by maintainers)

Most upvoted comments

👍 5.0