-
Notifications
You must be signed in to change notification settings - Fork 192
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
Call captureStackTrace to filter boom from traces #68
Conversation
|
||
internals.internal = function (message, data, statusCode, ctor) { | ||
|
||
var error = (data instanceof Error ? exports.wrap(data, statusCode, message) : internals.create(statusCode || 500, message, ctor)); |
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.
Can you rewrite this as an if
else
? I find executing functions inside ternary operators a little hard to follow for the humans.
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.
This is simply porting the existing code defined in the original method.
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.
Understood, but since you're in there anyway... 🍰
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.
Will update later tonight.
Do we want to expose something to make this behavior configurable? |
Regarding making this configurable, what is the use case for consumers of boom (vs. authors of boom)? From the consumer perspective I can't think of a case where they should care about the internals. From the author perspective, you do loose some potential data but this seems to be a reasonable price considering the relatively limited internal complexity of the library and the benefit provided to users. |
Dropping the boom part of the stack makes sense to me. I don't think a setting it useful here. |
Changed the |
This looks great. How do you think this should be versioned? My gut tells me Thoughts @hueniverse? |
The error stack's content was never api, right? Major seems unnecessary.
|
I would also go with minor or patch, not part of "public api" and would be weird to rely on the fact that it is in there imo |
Call captureStackTrace to filter boom from traces
Minor. |
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. |
Fixes #67