-
-
Notifications
You must be signed in to change notification settings - Fork 3.2k
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: set err.headerSent before app error event emit #919
Conversation
6c659f8
to
4f5cdb8
Compare
Codecov Report
@@ Coverage Diff @@
## master #919 +/- ##
=====================================
Coverage 100% 100%
=====================================
Files 4 4
Lines 423 425 +2
Branches 100 101 +1
=====================================
+ Hits 423 425 +2
Continue to review full report at Codecov.
|
Codecov Report
@@ Coverage Diff @@
## master #919 +/- ##
=====================================
Coverage 100% 100%
=====================================
Files 4 4
Lines 423 425 +2
Branches 100 101 +1
=====================================
+ Hits 423 425 +2
Continue to review full report at Codecov.
|
|
||
app.on('error', err => { | ||
err.message.should.equal('mock error'); | ||
err.headerSent.should.equal(true); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the only difference is we can get err.headerSent
in app's error listener?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think so
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes
More of a feature than a fix but 👍 |
@fengmk2 make a PR to v1.x please. |
@dead-horse ok |
No description provided.