-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Add hook/callback/event to be fired when raven has reported an error to sentry #81
Comments
You want a callback for after the http request has been made, just to clarify? Right now, we just blindly fire and forget. :) The only reason I ask, is I'm not sure how hooking into TraceKit at all would satisfy this, since TraceKit isn't aware of us actually doing anything with the message. |
That's my point, it doesnt really solve the problem. Ideally, we'd be notified whether the request failed or succeeded. TL;DR: yes. |
It'd be possible. Image objects have callbacks like, |
That would be great. |
I agree. A callback mechanism would be very helpful. Please make it compatible with the "global" error handler. Maybe it could be passed into the Raven.config options object.
|
How about dispatching events instead? I'm more of a fan of events instead of callbacks. |
Something like: Raven.config('...').install().addEventListener('logged', function() { }); |
searching the source of the current master repo says "yes" Blake Israel On Wed, Oct 22, 2014 at 1:58 AM, danse [email protected] wrote:
|
Modified CoffeeScript example to use CoffeeScript
Fixes [CodeQL #81](https://github.com/getsentry/sentry-javascript/security/code-scanning/81). The `.replace()` originally here only replaced the first occurrence of double-backslashes. Using a regex with a global flag option ensures all of the `\\`'s are replaced with `/`.
I've been trying to add custom error handling to sometimes reload a page when a particular type of error occurs, but I'd also like to report that through raven to sentry.
My current way of accomplishing this is by exposing the private TraceKit used by Raven through a Raven.TK variable.
This is sort of sub optimal, though, since TraceKit does all sorts of weird stuff if you're on IE, etc, and I'm not always guaranteed that my tracekit handler will be called before Raven's TK handler.
It also requires me to know that Raven uses TK and how TK works.
In reality, all I need to know is that Raven has caught an error, and successfully reported it Sentry, and also ideally the error it reported.
Then I could let Raven handle errors, report them, and when it's done, look at the error and try reloading.
Thanks.
The text was updated successfully, but these errors were encountered: