Skip to content

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

@sdhull

Description

@sdhull

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions