Skip to content

Error events has error property of null #14155

@reinaldoignatius

Description

@reinaldoignatius

Environment

SaaS (https://sentry.io/)

What are you trying to accomplish?

I have an SDK that captures error events into sentry by using the script below.
window.addEventListener('error', (event) => { client.captureException(event); });

How are you getting stuck?

This works while testing locally, but when I access my SDK via script tag in an external application, the error property in the event is null and the error message becomes "Script Error."
Tried the solution in this page https://sentry.io/answers/script-error/ but it still results in "Script Error."
I've made sure my SDK has access-control-allow-origin: * header. And the script tag that loads the SDK has crossorigin='anonymous'

Where in the product are you?

Other

Link

No response

DSN

No response

Version

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    BugPackage: browserIssues related to the Sentry Browser SDK

    Projects

    Status

    Waiting for: Community

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions