ember-fastboot / ember-fastboot/fastboot-express-middleware

Test that tests resilient mode without custom error handler incorrect

Open
#50 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
No language data
Stars
17
Forks
42
PR merge metrics
No merged PRs in 30d

Description

### 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](https://expressjs.com/en/guide/error-handling.html#the-default-error-handler) 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?

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by locating and running the test case for resilient mode without a custom error handler. Read how the test configures Express and compare that setup with Express's documented default error handler behavior. Done means the test accurately demonstrates whether the default handler subverts resilient mode and passes with the intended expectation.

Written by the indexing model from the issue text.

Assessment

Tech stack
express
Domain
backend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.