designcourse
designcourse copied to clipboard
DOM event objects provided as errors are hard to troubleshoot
Some code (not sure if ours or 3rd party) seems to be throwing an Event object.
This is a commonly-misused pattern in JavaScript world.
something.onerror = e => {
throw e
}
It would help if the event name and event target class name is serialized in Datadog RUM.
Hi @dtinth, browsers intentionally hide errors thrown by script files from different origins for security reasons.
You could try tweaking your CORS settings (if you control the third-party origin), or set crossorigin=anonymous
on the script tags. For more details check out this blog post.
Let me know if that works for you 😄