expressjs / expressjs/express

Default responder should not console.error 4xx errors

Open
#2,263 17 comments 0 reactions 0 assignees View on GitHub
5.x ideas module:finalhandler
Dominant language
JavaScript
Stars
69.5k
Forks
25k
Avg merge
4d 20h
Merged PRs (30d)
9

Description

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.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.