-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: handle more error rendering edge-cases
This handles a couple of edge-cases we were missing that we _do_ handle in n-express. These are required before we can consider replacing the n-express error handling with Reliability Kit. We've done the following: * Ensure that we don't try to render the error page if the response headers have already been sent. This is recommended in the Express documentation * Ensure that the HTTP status code we send is between 400 and 599. This prevents poor error handling in apps from accidentally sending false positives by responding with 200 statuses for errors.
- Loading branch information
1 parent
d1f9522
commit b169c3d
Showing
2 changed files
with
107 additions
and
23 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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