-
Notifications
You must be signed in to change notification settings - Fork 160
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
Error event includes original error #246
Error event includes original error #246
Conversation
Because this could really impact downstream reporters I think you need to make this an option that defaults to |
@@ -205,7 +205,8 @@ internals.Monitor.prototype._errorHandler = function (request, error) { | |||
timestamp: request.info.received, | |||
message: error.message, | |||
stack: error.stack, | |||
pid: process.pid | |||
pid: process.pid, | |||
originalError: error |
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.
Maybe rename to errorObject
?
I've updated the PR with your suggestions. I'm thinking for a future major release, it might be better to remove this option and have good-reporter filter out the |
Rebased from master and fixed the test that was failing. |
expect(eventsOne.length).to.equal(1); | ||
|
||
expect(request.event).to.equal('error'); | ||
expect(request.errorObject).to.exist; |
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.
Please check the documentation for Code.expect
here. Some of your assertions are no longer correct.
Sorry about the delay in resolving these. I've been out of town. |
|
||
server.start(function () { | ||
|
||
var req = Http.request({ |
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.
Just use a simple GET request here. A lot less code and a lot easier. All you really need to happen is the server to error. You can probably just do server.inject
instead of starting up the whole HTTP stack.
Closing due to inactivity. |
This thread has been automatically locked due to inactivity. Please open a new issue for related bugs or questions following the new issue template instructions. |
It would be nice for reporters to have access to the original error in case they want to do something with it.
In my case, I am writing a reporter for Rollbar, and their library requires the error object in order to do their own parsing.