Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat!: render stripped back errors in production #789

Merged
merged 1 commit into from
Nov 16, 2023

Conversation

rowanmanning
Copy link
Member

@rowanmanning rowanmanning commented Nov 15, 2023

This makes the error rendering middleware also take responsibility for outputting an error page in production environments. In production no error details are leaked and we only render the status code and message, this replicates the behaviour currently in n-express.

We're doing this to reduce the footprint of n-express (#310) which currently contains some error rendering logic. Once use of the Reliability Kit error rendering middleware is more ubiquitous we should be able to remove the error handling code from n-express in a new major version.

While this is technically a breaking change, if an app is using n-express then it's safe to upgrade. This is because this package behaves in exactly the same way as the n-express error handler.

@rowanmanning rowanmanning requested a review from a team as a code owner November 15, 2023 14:01
This makes the error rendering middleware also take responsibility for
outputting an error page in production environments. In production no
error details are leaked and we only render the status code and message,
this replicates the behaviour currently in n-express.

We're doing this to reduce the footprint of n-express (#310) which
currently contains some error rendering logic. Once use of the
Reliability Kit error rendering middleware is more ubiquitous we should
be able to remove the error handling code from n-express in a new major
version.

While this is technically a breaking change, if an app is using
n-express then it's safe to upgrade. This is because this package
behaves in exactly the same way as the n-express error handler.
@rowanmanning rowanmanning merged commit d4e1e71 into main Nov 16, 2023
3 checks passed
@rowanmanning rowanmanning deleted the render-all-errors branch November 16, 2023 13:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants