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

Test that tests resilient mode without custom error handler incorrect #50

Open
sdhull opened this issue Jul 16, 2019 · 0 comments
Open

Comments

@sdhull
Copy link
Contributor

sdhull commented Jul 16, 2019

Calling all knowledgeable Express.js folks!

The test case in this repo that tests resilient mode without a custom error handler should fail (eg, it does IRL when using resilient mode without a custom error handler), but for some reason it passes.

My impression from reading the docs is that the default Express error handler will render the built-in error page when it gets called, which will in turn subvert the resilient behavior.

So you actually must define an error handler like

app.use(function (err, req, res, next) {
  console.error(err.stack)
  next();
})

To essentially ignore the error and allow resilient mode to continue.

But the tests don't reflect that. Are they somehow turning off the default error handler in express?

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

No branches or pull requests

1 participant