-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
DOMError is captured as [object DOMError]
#939
Comments
This is sort of related to #879 - there are a couple situations where we're relying on
We resolved this in raven-node by using node's The other possibility for this case in particular is that we should make |
So I did some digging on this and I think what we should do is:
Regardless of what we actually do, we should try to treat Note that we don't re-throw when failing the So right now, /cc @graingert - considering reverting #919 because we actually don't get a stack trace for Alternative path is to make /cc @benvinegar |
Realized this also relates to #360. |
@LewisJEllis I'm okay with special casing |
Bump. I get a lot of reports about this error, which occurs only in Safari (iOS/OSX). |
@StudioMaX are you by any chance able to isolate and provide a snippet that I could use to reproduce this issue? It's be very helpful here. |
@kamilogorek unfortunately, I cannot reproduce the error that occurs in my case. I tried partially to implement this commit https://github.com/getsentry/raven-js/pull/1181/files#diff-a4cb6d8063a6aea4bba2d6f10472b5f4R461 on my project for debugging, but when someone throws this error, captureMessage: function(msg, options) {
// Convert the message into a string
var exceptionMessage;
if (typeof msg === 'object' && msg !== null) {
exceptionMessage = '' + msg + ': ' + JSON.stringify(msg); // <--
} else {
exceptionMessage = '' + msg;
}
// ...
var data = objectMerge(
{
message: exceptionMessage
},
options
); Stacktrace here: https://sentry.io/share/issue/602b3ae3524a4450a80033bfb4b437c6/ |
Addressed in #1310 |
Released as |
Thanks @kamilogorek! |
Do you want to request a feature or report a bug?
bug
What is the current behavior?
When a
DOMError
is thrown, raven-js logs the error as'[object DOMError]'
without any proper messaging. reference: https://github.com/getsentry/raven-js/blob/b8afab1d156467cb2cca0a166385fe9a94aff2cb/dist/raven.js#L413What is the expected behavior?
The DOMError interface is not actually an instance of
Error
or anException
and does not include a stacktrace. Since it doesn't pass theisError
check, it's converted to a string and is re-thrown.Our expected behavior would be to pull out the
name
property and throw/log asDOMError: ${error.name}
, so we can have as much context on the error as possible.Which versions of Raven.js, and which browser and OS are affected by this issue?
Pretty much every version of both.
Did this work in previous versions of Raven.js?
No
Are you using the CDN (http://ravenjs.com)?
No
Are you using hosted Sentry or on-premises?
Hosted
The text was updated successfully, but these errors were encountered: