Repository navigation
docs: error handling spoke - #2539
Merged
Merged
Conversation
✅ Deploy Preview for expressjscom-preview ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
Member
|
Deploy preview: I also opened #2549 to capture your comment re the existing error handling guide. |
Member
Some other suggestions that emphasize that this specifically addresses security concerns:
|
crandmck
requested changes
Oct 25, 2026
crandmck
left a comment
Member
There was a problem hiding this comment.
Hope this is not too much! I used suggestions to try to make it easier fo you.
Co-authored-by: Rand McKinney <crandmck@gmail.com> Signed-off-by: Jon Church <me@jonchurch.com>
crandmck
approved these changes
Nov 8, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Here's the spoke page for the error handling part of the Security docs.
Note that we need a better title for this, I left it currently as "Error handling" but that mirrors an existing guide that we have. So we need a better title to not shadow that existing page. Maybe something like "Error responses and disclosure"? Not sure
Another thing I realized is that the error handling guide we already have shows something that I urge not to do in this guide. The existing error handling guide has several example handlers that do
res.render('error', { error: err }), passing the whole error object into the template. That's exactly the kind of leak this page tells people to avoid. I'm not touching the guide here, but it needs a follow-up PR so the two pages agree.