Skip to content
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

Rollbar event wrapper should have nicer stack traces #269

Closed
rokob opened this issue May 1, 2017 · 0 comments
Closed

Rollbar event wrapper should have nicer stack traces #269

rokob opened this issue May 1, 2017 · 0 comments

Comments

@rokob
Copy link
Contributor

rokob commented May 1, 2017

We wrap certain functions such as certain global event handlers in order to catch otherwise unhandled exceptions that do not necessarily go through the window.onerror handler. This leads to stack traces with what looks like rollbar code causing the error due to the _wrapped method showing up at the top of the stack trace.

Additionally, this makes host whitelisting hard to do for bundled code because that _wrapped frame will usually have a filename that matches the client's bundle because that is where rollbar lives.

The code that does the wrapping should pass information to rollbar.error which signals that the error is being generated within a wrapped function. This can then be used to modify that particular frame in the trace to have something like:

{
    lineno: null,
    colno: null,
    method: null,
    filename: "<Rollbar Event Wrapper>"
}
@rokob rokob added this to the v2.2.0 milestone Jun 19, 2017
@rokob rokob closed this as completed in 2dc8eea Jul 14, 2017
mudetroit pushed a commit that referenced this issue Mar 14, 2024
[Fixes #269] get rid of rollbar wrapper stack frames
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants