question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

DOMError is captured as `[object DOMError]`

See original GitHub issue

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#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:closed
  • Created 6 years ago
  • Reactions:1
  • Comments:10 (7 by maintainers)

github_iconTop GitHub Comments

1reaction
paularmstrongcommented, May 10, 2018

Thanks @kamilogorek!

1reaction
kamilogorekcommented, May 10, 2018

Released as 3.25.0

Read more comments on GitHub >

github_iconTop Results From Across the Web

DOMError - Web APIs - MDN Web Docs
The DOMError interface describes an error object that contains an error name.
Read more >
Replace use of DOMError with DOMException in IndexedDB
The way DOMError (and MediaError) is used as an attribute is a bit different, it is an object that can be inspected when...
Read more >
Unhandled Promise Rejection: [object DOMError]
When I play that video in Safari, it shows a / over the play button, which usual has something to do with Mime...
Read more >
DOMError (Java Platform SE 7 ) - Oracle Help Center
DOMError is an interface that describes an error. See also the Document Object Model (DOM) Level 3 Core Specification. Since: DOM Level 3 ......
Read more >
Re: RTCError, DOMError, and... what happened? from cowwoc on ...
(The multitude of *Error objects is >> ECMAScript is not seen as a great design ... Perhaps it would be more beneficial to...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found