DOMError is captured as `[object DOMError]`
See original GitHub issueDo 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#L413
What is the expected behavior?
The DOMError interface is not actually an instance of Error
or an Exception
and does not include a stacktrace. Since it doesn’t pass the isError
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 as DOMError: ${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
Issue Analytics
- State:
- Created 6 years ago
- Reactions:1
- Comments:10 (7 by maintainers)
Top GitHub Comments
Thanks @kamilogorek!
Released as
3.25.0